本文整理汇总了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()