Python google.appengine.api.memcache.delete_multi() Examples

The following are 6 code examples of google.appengine.api.memcache.delete_multi(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module google.appengine.api.memcache , or try the search function .
Example #1
Source File: result_stats.py    From browserscope with Apache License 2.0 5 votes vote down vote up
def DeleteMemcacheValues(cls, category, browsers):
        memcache.delete_multi(browsers, **cls.MemcacheParams(category)) 
Example #2
Source File: models.py    From RSSNewsGAE with Apache License 2.0 5 votes vote down vote up
def flush_keyword_cache():
    return memcache.delete_multi(keys=["enable_keyword", "keyword",'pure_keyword']) 
Example #3
Source File: models.py    From RSSNewsGAE with Apache License 2.0 5 votes vote down vote up
def flush_feed_cache():
    return memcache.delete_multi(keys=["feed", "daily_feed", "hourly_feed", "quarterly_feed"]) 
Example #4
Source File: memcache_stub.py    From python-compat-runtime with Apache License 2.0 5 votes vote down vote up
def ExpireAndLock(self, timeout):
    """Marks this entry as deleted and locks it for the expiration time.

    Used to implement memcache's delete timeout behavior.

    Args:
      timeout: Parameter originally passed to memcache.delete or
        memcache.delete_multi to control deletion timeout.
    """
    self.will_expire = True
    self.locked = True
    self._SetExpiration(timeout) 
Example #5
Source File: sessions.py    From python-for-android with Apache License 2.0 5 votes vote down vote up
def delete(self):
        try:
            query = _AppEngineUtilities_SessionData.all()
            query.filter("session_key = ", self.session_key)
            results = query.fetch(1000)
            db.delete(results)
            db.delete(self)
            memcache.delete_multi(["_AppEngineUtilities_Session_" + str(self.session_key), "_AppEngineUtilities_SessionData_" + str(self.session_key)])
        except:
            mc = memcache.get("_AppEngineUtilities_Session_" + str(self.session_key))
            mc.deleted = True
            memcache.set("_AppEngineUtilities_Session_" + str(self.session_key), mc) 
Example #6
Source File: templates.py    From cloud-playground with Apache License 2.0 5 votes vote down vote up
def ClearCache():
  # TODO: determine why the just deleting our keys is insufficient:
  # memcache.delete_multi(keys=[_MEMCACHE_KEY_REPO_COLLECTIONS,
  #                       _MEMCACHE_KEY_TEMPLATES])
  memcache.flush_all()