Updated mako lib

This commit is contained in:
rembo10
2014-03-31 21:50:41 -07:00
parent 708f5fcd70
commit 0c714a78de
22 changed files with 570 additions and 318 deletions
+5 -5
View File
@@ -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)