Changeset 1054
- Timestamp:
- 04/22/06 12:46:52
- Files:
-
- trunk/cherrypy/lib/caching.py (modified) (2 diffs)
- trunk/cherrypy/test/test_cache_filter.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/lib/caching.py
r1047 r1054 96 96 97 97 98 def init(): 99 cache_class = cherrypy.config.get("hooks.cache.class", MemoryCache) 98 def init(cache_class=None): 99 if cache_class is None: 100 cache_class = MemoryCache 100 101 cherrypy._cache = cache_class() 101 102 … … 152 153 def setup(conf): 153 154 """Hook caching into cherrypy.request using the given conf.""" 155 if not getattr(cherrypy, "_cache", None): 156 init(conf.get("class", None)) 154 157 def wrapper(): 155 158 if get(): trunk/cherrypy/test/test_cache_filter.py
r1017 r1054 21 21 'server.log_to_screen': False, 22 22 'server.environment': 'production', 23 ' cache_filter.on': True,23 'tools.caching.on': True, 24 24 }) 25 25

