Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1054

Show
Ignore:
Timestamp:
04/22/06 12:46:52
Author:
fumanchu
Message:

Fixed the caching tool and test.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/lib/caching.py

    r1047 r1054  
    9696 
    9797 
    98 def init(): 
    99     cache_class = cherrypy.config.get("hooks.cache.class", MemoryCache) 
     98def init(cache_class=None): 
     99    if cache_class is None: 
     100        cache_class = MemoryCache 
    100101    cherrypy._cache = cache_class() 
    101102 
     
    152153def setup(conf): 
    153154    """Hook caching into cherrypy.request using the given conf.""" 
     155    if not getattr(cherrypy, "_cache", None): 
     156        init(conf.get("class", None)) 
    154157    def wrapper(): 
    155158        if get(): 
  • trunk/cherrypy/test/test_cache_filter.py

    r1017 r1054  
    2121            'server.log_to_screen': False, 
    2222            'server.environment': 'production', 
    23             'cache_filter.on': True, 
     23            'tools.caching.on': True, 
    2424    }) 
    2525 

Hosted by WebFaction

Log in as guest/cpguest to create tickets