Akash created HTTPCLIENT-2406:
---------------------------------
Summary: MemcachedHttpCacheStorage always stores data in remote
store with zero expiration.
Key: HTTPCLIENT-2406
URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2406
Project: HttpComponents HttpClient
Issue Type: Bug
Components: HttpCache, HttpClient (classic)
Reporter: Akash
MemcachedHttpCacheStorage today calls remote cache store with "0" TTL
indicating the remote cache to never clean up the cached data. Hence the remote
cache memory is filling up over a period of time without any sort of clean up
since the TTL is 0.
{code:java}
@Override
protected void store(final String storageKey, final byte[] storageObject)
throws ResourceIOException {
try {
client.set(storageKey, 0, storageObject);
} catch (final CancellationException ex) {
throw new MemcachedOperationCancellationException(ex);
}
} {code}
>From what I can tell, this is implemented this way for a long time now, is
>this intentional ? if not, do you consider it as a bug?
Shouldn't the TTL sent as part of the response be used during this call?
https://github.com/apache/httpcomponents-client/blob/master/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/memcached/MemcachedHttpCacheStorage.java#L174
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]