Closed GoogleCodeExporter closed 8 years ago
This functionality doesn't belong in httplib2. You could create a wrapper for
memcache that did the limiting:
from google.appengine.api.memcache
class SizeLimitedMemCache(object):
def set(key, value, time=0, min_compress_len=0, namespace=None):
if len(value) < 1000000:
return memcache.set(key, value, time, min_compress_len, namespace)
else:
return False
def get(key, namespace=None, for_cas=False):
return memecache.get(key, namespace, for_cas)
def delete(key, seconds=0, namespace=None):
return memcache.delete(key, seconds, namespace)
Original comment by jcgregorio@google.com
on 5 Dec 2012 at 10:51
The better solution is to wrap the GAE cache with a layer that nicely rejects
items that are too large.
Original comment by joe.gregorio@gmail.com
on 13 Oct 2013 at 3:05
Original issue reported on code.google.com by
someone1@gmail.com
on 5 Dec 2012 at 8:12Attachments: