How to use the cachelib.redis.RedisCache function in cachelib

To help you get started, we’ve selected a few cachelib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github inveniosoftware / flask-iiif / flask_iiif / cache / redis.py View on Github external
def __init__(self, app=None):
        """Initialize the cache."""
        super(ImageRedisCache, self).__init__(app=app)
        app = app or current_app
        redis_url = app.config['IIIF_CACHE_REDIS_URL']
        prefix = app.config.get('IIIF_CACHE_REDIS_PREFIX', 'iiif')
        self.cache = RedisCache(
            host=StrictRedis.from_url(redis_url),
            key_prefix=prefix
        )

cachelib

A collection of cache libraries in the same API interface.

BSD-3-Clause
Latest version published 7 months ago

Package Health Score

89 / 100
Full package analysis