This module provides caching with support for different backends. The default implementation is ResponseCache.
Methods and Constants¶
The cache is disabled by default. Use it like so:
import logging from sunlight import response_cache response_cache.enable('mongo') response_cache.logger.setLevel(logging.DEBUG)
Note: the implementation below doesn’t bother with cache expiration. Typical use case is caching API calls during an expensive build process.
In-memory cache for API responses.
Mongo cache of API respones.