Chromium Code Reviews| Index: chrome/common/extensions/docs/server2/memcache.py |
| diff --git a/chrome/common/extensions/docs/server2/memcache.py b/chrome/common/extensions/docs/server2/memcache.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4905ff5665340106110d9f03a12e452c0bf678d6 |
| --- /dev/null |
| +++ b/chrome/common/extensions/docs/server2/memcache.py |
| @@ -0,0 +1,13 @@ |
| +# 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
|
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +from google.appengine.api import memcache |
| + |
| +DEFAULT_CACHE_TIME = 300 |
| + |
| +def MemcacheAdd(key, data, namespace): |
| + return memcache.add(key, data, DEFAULT_CACHE_TIME, namespace=namespace) |
| + |
| +def MemcacheGet(key, namespace): |
| + return memcache.get(key, namespace=namespace) |