# Path: mako/util.py
# def update_wrapper(decorated, fn):
#     def __init__(self, group):
#     def load(self, name):
#     def register(self, name, modulepath, objname):
#         def load():
# def verify_directory(dir_):
# def to_list(x, default=None):
#     def __init__(self, fget, doc=None):
#     def __get__(self, obj, cls):
#     def __init__(self, fget, doc=None):
#     def __get__(self, obj, cls):
#         def oneshot(*args, **kw):
#             def memo(*a, **kw):
#     def union(self, other):
#     def __init__(self, encoding=None, errors="strict"):
#     def truncate(self):
#     def getvalue(self):
#         def __init__(self, key, value):
#         def __repr__(self):
#     def __init__(self, capacity, threshold=0.5):
#     def __getitem__(self, key):
#     def values(self):
#     def setdefault(self, key, value):
#     def __setitem__(self, key, value):
#     def _manage_size(self):
# def parse_encoding(fp):
# def sorted_dict_repr(d):
# def restore__ast(_ast):
# def read_file(path, mode="rb"):
# def read_python_file(path):
# class PluginLoader:
# class memoized_property:
# class memoized_instancemethod:
# class SetLikeDict(dict):
# class FastEncodingBuffer:
# class LRUCache(dict):
#     class _Item:


from mako import util
        # constructor
        if isinstance(template, str) and args:
            return
        self.template = template
        self.id = template.module.__name__
        self.starttime = template.module._modified_time
        self._def_regions = {}
        self.impl = self._load_impl(self.template.cache_impl)

    def _load_impl(self, name):
        return _cache_plugins.load(name)(self)

    def get_or_create(self, key, creation_function, **kw):
        """Retrieve a value from the cache, using the given creation function
        to generate a new value."""

        return self._ctx_get_or_create(key, creation_function, None, **kw)

    def _ctx_get_or_create(self, key, creation_function, context, **kw):
        """Retrieve a value from the cache, using the given creation function
        to generate a new value."""

        if not self.template.cache_enabled:
            return creation_function()

        return self.impl.get_or_create(
            key, creation_function, **self._get_cache_kw(kw, context)
        )

    def set(self, key, value, **kw):

# Path: mako/util.py
# def update_wrapper(decorated, fn):
#     def __init__(self, group):
#     def load(self, name):
#     def register(self, name, modulepath, objname):
#         def load():
# def verify_directory(dir_):
# def to_list(x, default=None):
#     def __init__(self, fget, doc=None):
#     def __get__(self, obj, cls):
#     def __init__(self, fget, doc=None):
#     def __get__(self, obj, cls):
#         def oneshot(*args, **kw):
#             def memo(*a, **kw):
#     def union(self, other):
#     def __init__(self, encoding=None, errors="strict"):
#     def truncate(self):
#     def getvalue(self):
#         def __init__(self, key, value):
#         def __repr__(self):
#     def __init__(self, capacity, threshold=0.5):
#     def __getitem__(self, key):
#     def values(self):
#     def setdefault(self, key, value):
#     def __setitem__(self, key, value):
#     def _manage_size(self):
# def parse_encoding(fp):
# def sorted_dict_repr(d):
# def restore__ast(_ast):
# def read_file(path, mode="rb"):
# def read_python_file(path):
# class PluginLoader:
# class memoized_property:
# class memoized_instancemethod:
# class SetLikeDict(dict):
# class FastEncodingBuffer:
# class LRUCache(dict):
#     class _Item:


# Path: mako/cache.py
from mako import util

        # constructor
        if isinstance(template, str) and args:
            return
        self.template = template
        self.id = template.module.__name__
        self.starttime = template.module._modified_time
        self._def_regions = {}
        self.impl = self._load_impl(self.template.cache_impl)

    def _load_impl(self, name):
        return _cache_plugins.load(name)(self)

    def get_or_create(self, key, creation_function, **kw):
        """Retrieve a value from the cache, using the given creation function
        to generate a new value."""

        return self._ctx_get_or_create(key, creation_function, None, **kw)

    def _ctx_get_or_create(self, key, creation_function, context, **kw):
        """Retrieve a value from the cache, using the given creation function
        to generate a new value."""

        if not self.template.cache_enabled:
            return creation_function()

        return self.impl.get_or_create(
            key, creation_function, **self._get_cache_kw(kw, context)
        )

    def set(self, key, value, **kw):

        r"""Place a value in the cache.