cache is now gluino friendly

This commit is contained in:
Massimo DiPierro committed 2012-03-13 13:59:15 -05:00
1 parent ff298ca507
commit 80e36aec6a
2 files changed
+8 -3

No files matched your search

+7 -2
View File
@@ -27,6 +27,11 @@ import thread
import os
import logging
import re
try:
import settings
have_settings = True
except ImportError:
have_settings = False
logger = logging.getLogger("web2py.cache")
@@ -367,8 +372,8 @@ class Cache(object):
the global request object
"""
# GAE will have a special caching
import settings
if settings.global_settings.web2py_runtime_gae:
if have_settings and settings.global_settings.web2py_runtime_gae:
from contrib.gae_memcache import MemcacheClient
self.ram=self.disk=MemcacheClient(request)
else: