Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 004BC100D0 for ; Sat, 5 Oct 2013 10:30:01 +0000 (UTC) Received: (qmail 80332 invoked by uid 500); 5 Oct 2013 10:29:57 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 80306 invoked by uid 500); 5 Oct 2013 10:29:46 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 80284 invoked by uid 99); 5 Oct 2013 10:29:42 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Oct 2013 10:29:42 +0000 Date: Sat, 5 Oct 2013 10:29:42 +0000 (UTC) From: "Nicolas Richeton (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Reopened] (HTTPCLIENT-1384) Expose CacheInvalidator in CachingHttpClientBuilder MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCLIENT-1384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nicolas Richeton reopened HTTPCLIENT-1384: ------------------------------------------ > Expose CacheInvalidator in CachingHttpClientBuilder > --------------------------------------------------- > > Key: HTTPCLIENT-1384 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1384 > Project: HttpComponents HttpClient > Issue Type: Wish > Components: HttpCache > Affects Versions: 4.2.5, 4.3 Beta2 > Reporter: Nicolas Richeton > Fix For: 4.3 Final > > Attachments: patch.txt > > > There is currently no way to customize the CacheInvalidator. Could it be possible to allow setting a CacheInvalidator in CachingHttpClientBuilder (eg. CachingHttpClientBuilder#setCacheInvalidator()) > Our use case : > - HttpClientCache is used in a Caching Reverse Proxy (shared cache, exposed to public connections) > - We have to ensure the cache cannot be flush by a random user. > - The default CacheInvalidator flushes all variants of an URI when receiving anything other than GET, HEAD (compliant with RFC) > - It is currently possible for a user to flush the whole cache by sending POST requests of all uri (this may be harmful even only on a home page). > While it is not RFC-compliant, we need at least the ability to prevent invalidation in CacheInvalidator#flushInvalidatedCacheEntriesFor and/or control invalidation with custom method (PURGE) and other criteria (like remote ip) > The same applies to HttpClientCache 4.2.5: CachingHttpClient which does not allow provide a custom CacheInvalidator > Would this sound ok for you ? -- This message was sent by Atlassian JIRA (v6.1#6144) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org