At 07:29 AM 8/15/2005, Colm MacCarthaigh wrote: >On Mon, Aug 15, 2005 at 01:50:14PM +0200, Graham Leggett wrote: >> > It can't reliably disable caching for a directory. >> >> Proxy has a mechanism to do this, cache should have a similar mechanism. >> Does CacheDisable not do this? > >That's per-location, not per-directory. If multiple uri's map to the >same directory, I have to add per-location directives for each one. But >I'm *really* screwed when multiple vhosts, with different aliases point >to the same directory. > >My main reason is that I can't enable or disable caching on a >per-directory or per-file basis.
Twofold issue, and I think this is where we've confused things. The cache should be walked RUN_VERY_FIRST in map_to_storage; the cache ***is*** a URI store. The cache has nothing to do with any files or directories (although your regex solution would help to disable caching of certain files, e.g. ".*.tar.gz$"). The other side is -when- do we decide to cache? In the fixups phase it would be trivial to support a NoCache 'local' syntax which is checked before we start setting aside the response into our local cache. This is the right way to decide caching. You are asking for mod_cache to be intimate with the details of the request, and it's none of mod_cache's damned business where the content of its cache comes from. But on the other hand, adding a fixup to declare content that is non-cacheable by the local apache instance is quite legitimate. Bill