On 1/29/13 8:57 AM, James Peach wrote:
On 29/01/2013, at 1:11 AM, Bowei Du <b...@instartlogic.com> wrote:

Hi all,

I am looking for a way to quickly get a list of all objects stored in the
ATS cache that start with a given string prefix (for example, given "
foo.com/bar", returns objects {foo.com/bar123, foo.com/bar456,  ...}). As
far as I can tell, the actual URL of the cached object is not stored in
memory and this operations requires scanning the volumes and reading the
metadata for each HTTP object from disk.
I think that you'd have to build an index in memory or in the cache. I don't 
think you can iterate the HTTP cache from a plugin, so you might have to hack 
the core :(



It should be possible to traverse the entire cache, but it'll be incredibly expensive and slow on large caches. See TSCacheScan() and the cache_scan plugin for more details on scanning the cache.

-- Leif

Reply via email to