Feature Request P2
Status Update
Comments
cl...@gmail.com <cl...@gmail.com> #2
Also it would be usefull to have an oppprtunity to clear all keys in specified
namespace. i.e flush_all(namespace=None or 'specified')
namespace. i.e flush_all(namespace=None or 'specified')
ik...@google.com <ik...@google.com> #3
This isn't even available in memcache instances: http://memcached.org/
pv...@google.com <pv...@google.com> #4
pv...@google.com <pv...@google.com> #5
I have forwarded this request to the engineering team. We will update this issue with any progress updates and a resolution.
Best regards, pvoutsinas
Best regards, pvoutsinas
th...@locandy.com <th...@locandy.com> #6
One UseCase is to prefix-query all memcache keys that start with a certain string. This would allow a cron handler to query for e.g. "StatsCounter_key-string" and then to save all counters that exist in cache to DB. That would result in a very simple implementation of lossy counting with cron. Now this only works via many task-queue entries or the DB to remember a list of keys to save.
Description
be useful. This would be somewhat similar to Python's dict.keys()
or .iterkeys().
Example use case:
A webservice counts "hits" using memcache.incr() by user. Periodically,
those cached counts are used to increment coresponding rows in an entity.
Using a (to be defined) memcache.keys(namespace='namespace') iterator,
entity keys can be directly constructed and only the necessary rows are
retrieved and updated.
Currently, since there is no way of knowing which users have cached
counts, either all rows in the entity must be iterated over and the
corresponding cache key checked, or an additional cached data structure
must be maintained that in effect emulates memcache key iteration. This
last approach is problematic when updates to this structure by multiple
application instances are considered.
The existence and value of the keys in memcache is important information
independent of the cached values themselves.