Beispiel #1
0
def cache_test(request):
    response_data = {
        "CSS_CACHE": cache.get(get_cache_key("css")),
        "JS_CACHE": cache.get(get_cache_key("js")),
    }
    return render_to_response("mub/test_cache.html", response_data, context_instance=RequestContext(request))
    
Beispiel #2
0
    def handle(self, *args, **options):
        cache.delete(get_cache_key("css"))
        cache.delete(get_cache_key("js"))

        css_compiler = StaticCompiler("css")
        css_compiler.minify(lock=True)
        js_compiler = StaticCompiler("js")
        js_compiler.minify(lock=True)
Beispiel #3
0
 def __init__(self, ext):
     """
     Initialize with the extension (e.g. 'js' or 'css')
     """
     self._file_from_cache = False
     self._ext = ext
     self._cache_key = get_cache_key(self._ext)
     self._items = {}
     self._ordered_items = []
     self._filename = None
     self._timestamp = None
     self._location = None
     self.cache_location = None
     self.is_minified = False
     self._compile_file_list()