Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
)