mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-22 03:17:45 +01:00
Updated mako lib
This commit is contained in:
@@ -7,11 +7,11 @@ from mako.cache import CacheImpl
|
||||
_beaker_cache = None
|
||||
class BeakerCacheImpl(CacheImpl):
|
||||
"""A :class:`.CacheImpl` provided for the Beaker caching system.
|
||||
|
||||
|
||||
This plugin is used by default, based on the default
|
||||
value of ``'beaker'`` for the ``cache_impl`` parameter of the
|
||||
:class:`.Template` or :class:`.TemplateLookup` classes.
|
||||
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self, cache):
|
||||
@@ -19,7 +19,7 @@ class BeakerCacheImpl(CacheImpl):
|
||||
if _beaker_cache is None:
|
||||
try:
|
||||
from beaker import cache as beaker_cache
|
||||
except ImportError, e:
|
||||
except ImportError:
|
||||
raise exceptions.RuntimeException(
|
||||
"the Beaker package is required to use cache "
|
||||
"functionality.")
|
||||
@@ -60,11 +60,11 @@ class BeakerCacheImpl(CacheImpl):
|
||||
def put(self, key, value, **kw):
|
||||
cache, kw = self._get_cache(**kw)
|
||||
cache.put(key, value, **kw)
|
||||
|
||||
|
||||
def get(self, key, **kw):
|
||||
cache, kw = self._get_cache(**kw)
|
||||
return cache.get(key, **kw)
|
||||
|
||||
|
||||
def invalidate(self, key, **kw):
|
||||
cache, kw = self._get_cache(**kw)
|
||||
cache.remove_value(key, **kw)
|
||||
|
||||
Reference in New Issue
Block a user