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

The following are 6 code examples for showing how to use google.appengine.api.memcache.delete_multi(). These examples are extracted from open source projects. 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 check out the related API usage on the sidebar.

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
Project: browserscope   Author: elsigh   File: result_stats.py    License: Apache License 2.0 5 votes vote down vote up
def DeleteMemcacheValues(cls, category, browsers):
        memcache.delete_multi(browsers, **cls.MemcacheParams(category)) 
Example 2
Project: RSSNewsGAE   Author: liantian-cn   File: models.py    License: 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
Project: RSSNewsGAE   Author: liantian-cn   File: models.py    License: 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
Project: python-compat-runtime   Author: GoogleCloudPlatform   File: memcache_stub.py    License: 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
Project: python-for-android   Author: kuri65536   File: sessions.py    License: 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
Project: cloud-playground   Author: googlearchive   File: templates.py    License: 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()