def render_cached(self, compressor, kind, mode): """ If enabled checks the cache for the given compressor's cache key and return a tuple of cache key and output """ cache_key = get_templatetag_cachekey(compressor, mode, kind) cache_content = cache_get(cache_key) return cache_key, cache_content
def render_cached(self, compressor, kind, mode, forced=False): """ If enabled checks the cache for the given compressor's cache key and return a tuple of cache key and output """ if settings.COMPRESS_ENABLED and not forced: cache_key = get_templatetag_cachekey(compressor, mode, kind) cache_content = cache_get(cache_key) return cache_key, cache_content return None, None