Example #1
0
def simple(app, config, args, kwargs):
    kwargs.update(
        dict(
            threshold=config["CACHE_THRESHOLD"],
            ignore_errors=config["CACHE_IGNORE_ERRORS"],
        ))
    return SimpleCache(*args, **kwargs)
Example #2
0
    def __init__(self, conf):

        super(ThreadedMixin, self).__init__(conf)

        if conf.getboolean("moderation", "enabled"):
            self.purge(conf.getint("moderation", "purge-after"))

        self.cache = Cache(SimpleCache(threshold=1024, default_timeout=3600))
Example #3
0
def simple(app, config, args, kwargs):
    return SimpleCache.factory(app, config, args, kwargs)