Larry Leszczynski wrote:
But I see your point about the danger of
clearing/flushing more than you might expect.  Regardless of cache
flavor, you could set up separate backend instances for different pools
of data (via e.g. different cache_roots for Cache::FileCache or
different server instances for Cache::Memcached::libmemcached) and make
sure you only clear() the intended backend.
I'd be against the method being called 'clear' as it'd be waaay to easy to misread the api and say $cache->clear($key)... Oops.

But having a general facility to map ->remove_the_entire_contents_of_the_cache_yes_i_really_want_to_do_this (ok, maybe not quite that method name as thats a little OTT in the other direction) to the appropriate handwave for your specific backend sounds reasonable, as long as its appropriately documented..

So patch away!

Cheers
t0m





_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to