Sign in

Google Cookbook - Google App Engine

Posted by robi123 on Mon 28 Sep 2009 in Memcache API
import time, os, random
from google.appengine.api import memcache
CURRENT_VERSION_ID = os.environ.get('CURRENT_VERSION_ID','0')
local_cache = {}
DOG_PILE_WINDOW = 10 # seconds ...
Posted by we.hong1 on Tue 04 Aug 2009 in Memcache API
import datastore_cachedatastore_cache.DatastoreCachingShim.Install()



使用很简单,在你的models.py 最上方


import datastore_cache
datastore_cache.DatastoreCachingShim.Install()



然后就可以享受memcache带来的急速体验了:-)
他的一些优点和限制:
. All entities will be cached in memcache as ...
Posted by fumarks on Thu 21 May 2009 in Memcache API
IF you have data that for some reason needs to be sent in many small pieces to the server, or ...
Posted by phil.totheworld on Fri 24 Apr 2009 in Memcache API
I've been trying to teach myself Python by witting a basic Twitter client in Google AppEngine.

One of the ...
Posted by evlogimenos on Tue 21 Apr 2009 in Memcache API
This is a class that seamlessly caches entities. Everything happens transparently.

All you need to do is:

import datastore_cache
datastore_cache ...
Posted by rosskarchner on Fri 09 Jan 2009 in Memcache API
The attached module wraps pytz and provides a work-alike for pytz.timezone that:

- Retrieves the time zone data from a ...
Posted by yejunx on Thu 23 Oct 2008 in Memcache API
Here is a simple patch to enable beaker's memcached backend and cache compiled mako template on google app engine ...
Posted by bcannon on Thu 18 Sep 2008 in Memcache API
A very common pattern when using the memcache is to request data, see if any data was returned, and either ...
Posted by royleban@groupthink.com on Sun 31 Aug 2008 in Memcache API
When using memcache in large projects, it's possible to get key collisions, especially with portions of the project being ...