Bug 50774 - Have a way to invalidate cache without other request processing
Summary: Have a way to invalidate cache without other request processing
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_cache (show other bugs)
Version: 2.5-HEAD
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-14 15:04 UTC by Ognyan Kulev
Modified: 2011-02-17 01:33 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ognyan Kulev 2011-02-14 15:04:03 UTC
In r1070179, bug 15868 (some HTTP methods MUST cause a cache to invalidate entities) is fixed. This led to discussion in httpd-dev that these non-GET methods should invalidate cache only if 2xx is in response: <http://mail-archives.apache.org/mod_mbox/httpd-dev/201102.mbox/%3C5E44EE80-76CD-4743-B57E-AF90FF0F97EC@gbiv.com%3E>. This doesn't consider a very important use of this invalidation ability.

As described in bug 43826, ability to invalidate cache have many benefits for web applications. It allows these web applications to server pages with very long cache age and when content changes, to invalidate all the affected URLs. A simple example is when a page in CMS is edited, it can just be invalidated and so everyone can see the change immediately.

This bug is about assuring that there's a way for web application to invalidate cache for all URLs it pleases without actually invoking the web application. For example, in a PHP-based system, without ever reaching PHP interpreter.

Example implementation is new content handler for just invalidating cache for request URL and return nothing. RewriteRule can use that content handler. All the security guards will be in RewriteCond. Before invalidating, RewriteRule can transform the URL in its final form for invalidating, e.g. http://example.com/invalidator/page123 to invalidate http://example.com/page123.
Comment 1 Ognyan Kulev 2011-02-17 01:33:28 UTC
Good content handler name is "cache-invalidate".

There should be a way for invalidating many cache entries at once and the easiest is an ability to invalidate all cache entries "below" request URI with "cache-invalidate-prefix" content handler.