django_unicorn.cacher#

Module Contents#

class django_unicorn.cacher.PointerUnicornView(component_cache_key)#
class django_unicorn.cacher.CacheableComponent(component: django_unicorn.views.UnicornView)#

Updates a component into something that is cacheable/pickleable. Also set pointers to parents/children. Use in a with statement or explicitly call __enter__ __exit__ to use. It will restore the original component on exit.

components() List[django_unicorn.views.UnicornView]#
django_unicorn.cacher.cache_full_tree(component: django_unicorn.views.UnicornView)#
django_unicorn.cacher.restore_from_cache(component_cache_key: str, request: django.http.HttpRequest = None) django_unicorn.views.UnicornView#

Gets a cached unicorn view by key, restoring and getting cached parents and children and setting the request.