Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
faust-streaming / faust / web / cache / backends / __init__.py
Size: Mime:
"""Cache backend registry."""
from typing import Type

from mode.utils.imports import FactoryMapping

from faust.types.web import CacheBackendT

__all__ = ["by_name", "by_url"]

BACKENDS: FactoryMapping[Type[CacheBackendT]] = FactoryMapping(
    memory="faust.web.cache.backends.memory:CacheBackend",
    redis="faust.web.cache.backends.redis:CacheBackend",
    rediscluster="faust.web.cache.backends.redis:CacheBackend",
)
BACKENDS.include_setuptools_namespace("faust.web.cache")
by_name = BACKENDS.by_name
by_url = BACKENDS.by_url