Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
|
Aaron Boodman
2012/05/24 06:10:23
I think you can just use the appengine memcache di
| |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 from google.appengine.api import memcache | |
| 6 | |
| 7 DEFAULT_CACHE_TIME = 300 | |
| 8 | |
| 9 def MemcacheAdd(key, data, namespace): | |
| 10 return memcache.add(key, data, DEFAULT_CACHE_TIME, namespace=namespace) | |
| 11 | |
| 12 def MemcacheGet(key, namespace): | |
| 13 return memcache.get(key, namespace=namespace) | |
| OLD | NEW |