Subject: | Feature Request: Support one-argument flush_cache('memoized_function') |
Isn't it pretty straight-forward to implement the one-argument
flush_cache('memoized_function') given this trick? :
http://code.google.com/p/memcached/wiki/NewProgrammingTricks#Deleting_By_Namespace
It would require that the key_prefix stored is in memcached and that
flush_cache('memoized_function') increments it like in the "trick"
above. This would require every get to be twofold: 1) get the key_prefix
and 2) get the value once we know the current key_prefix. So perhaps the
memcached hash argument to memoize_memcached should take a boolean
"flushable" key/value to determine if the two-step flushable approach
should be taken so as not to create performance degradation for existing
users.
I at least need the one-argument flush_cache to be available, so for now
I won't use Memoize::Memcached but do it myself. But this could be done
with no backwards-compatible API problems, couldn't it? Perhaps after
any change like this the one-argument flush_cache should issue a carp if
the function isn't setup with flushable=>1.
What do you think?
Peter