cache is now gluino friendly

This commit is contained in:
Massimo DiPierro
2012-03-13 13:59:15 -05:00
parent ff298ca507
commit 80e36aec6a
2 changed files with 8 additions and 3 deletions

View File

@@ -1 +1 @@
Version 1.99.7 (2012-03-13 13:54:42) dev
Version 1.99.7 (2012-03-13 13:59:13) dev

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: