本文整理匯總了Python中google.appengine.api.memcache.delete_multi方法的典型用法代碼示例。如果您正苦於以下問題:Python memcache.delete_multi方法的具體用法?Python memcache.delete_multi怎麽用?Python memcache.delete_multi使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類google.appengine.api.memcache
的用法示例。
在下文中一共展示了memcache.delete_multi方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: DeleteMemcacheValues
# 需要導入模塊: from google.appengine.api import memcache [as 別名]
# 或者: from google.appengine.api.memcache import delete_multi [as 別名]
def DeleteMemcacheValues(cls, category, browsers):
memcache.delete_multi(browsers, **cls.MemcacheParams(category))
示例2: flush_keyword_cache
# 需要導入模塊: from google.appengine.api import memcache [as 別名]
# 或者: from google.appengine.api.memcache import delete_multi [as 別名]
def flush_keyword_cache():
return memcache.delete_multi(keys=["enable_keyword", "keyword",'pure_keyword'])
示例3: flush_feed_cache
# 需要導入模塊: from google.appengine.api import memcache [as 別名]
# 或者: from google.appengine.api.memcache import delete_multi [as 別名]
def flush_feed_cache():
return memcache.delete_multi(keys=["feed", "daily_feed", "hourly_feed", "quarterly_feed"])
示例4: ExpireAndLock
# 需要導入模塊: from google.appengine.api import memcache [as 別名]
# 或者: from google.appengine.api.memcache import delete_multi [as 別名]
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)
示例5: delete
# 需要導入模塊: from google.appengine.api import memcache [as 別名]
# 或者: from google.appengine.api.memcache import delete_multi [as 別名]
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)
示例6: ClearCache
# 需要導入模塊: from google.appengine.api import memcache [as 別名]
# 或者: from google.appengine.api.memcache import delete_multi [as 別名]
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()