You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2025/12/10 10:29:00 UTC
[jira] [Commented] (HTTPCLIENT-2406) MemcachedHttpCacheStorage always stores data in remote store with zero expiration.
[ https://issues.apache.org/jira/browse/HTTPCLIENT-2406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18044083#comment-18044083 ]
ASF subversion and git services commented on HTTPCLIENT-2406:
-------------------------------------------------------------
Commit 79992d832cc5d9fb4ce8307200dae844085b9d3d in httpcomponents-client's branch refs/heads/dependabot/maven/io.opentelemetry-opentelemetry-bom-1.56.0 from Oleg Kalnichevski
[ https://gitbox.apache.org/repos/asf?p=httpcomponents-client.git;h=79992d832 ]
HTTPCLIENT-2406: MemcachedHttpCacheStorage to support per entry expiry setting
> 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: Improvement
> Components: HttpCache, HttpClient (classic)
> Reporter: Akash
> Priority: Minor
> Fix For: 5.6-alpha2
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org