清理旧的googleappengine会话
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了清理旧的googleappengine会话相关的知识,希望对你有一定的参考价值。
private void clearSessions() { DatastoreService datastore = DatastoreServiceFactory.getDatastoreService(); Query query = new Query("_ah_SESSION"); PreparedQuery results = datastore.prepare(query); log.info("Deleting " + results.countEntities() + " sessions from data store"); datastore.delete(session.getKey()); } } // clearing everything in the cache, because sessions are also kept in memcache private void clearCache() throws CacheException { CacheFactory cacheFactory = CacheManager.getInstance ().getCacheFactory(); CacheStatistics stats = cache.getCacheStatistics(); log.info("Clearing " + stats.getObjectCount() + " objects in cache"); cache.clear(); }
以上是关于清理旧的googleappengine会话的主要内容,如果未能解决你的问题,请参考以下文章
旧的调试会话阻止使用 vs 代码在 chrome 中进行调试