gitweb/lib - Add clear() and size() methods to caching interface
Add ->size() method, which following Cache::Cache interface returns
estimated total size of all entries in whole cache (in the namsepace
assiciated with give cache instance). Note that ->get_size($key)
returns size of a single entry!
Add ->clear() method, which removes all entries from the namespace
associated with given cache instance. For safety it requires
namespace to be set to true value, which means that it cannot be
empty; therefore default namespace is changed to 'gitweb'.
The ->clear() method should be fairly safe, because it first renames
directory (which should be atomic), and only then removes it
(following code from CGI::Driver::File).
Signed-off-by: Jakub Narebski <jnareb@gmail.com>