class documentation
class CacheMiddleware(UpdateCacheMiddleware, FetchFromCacheMiddleware): (source)
Cache middleware that provides basic behavior for many simple sites. Also used as the hook point for the cache decorator, which is generated using the decorator-from-middleware utility.
Method | __init__ |
Undocumented |
Instance Variable | cache |
Undocumented |
Instance Variable | cache |
Undocumented |
Instance Variable | key |
Undocumented |
Instance Variable | page |
Undocumented |
Inherited from UpdateCacheMiddleware
:
Method | process |
Set the cache, if needed. |
Property | cache |
Undocumented |
Method | _should |
Undocumented |
Inherited from FetchFromCacheMiddleware
(via UpdateCacheMiddleware
):
Method | process |
Check whether the page is already cached and return the cached version if available. |
Inherited from MiddlewareMixin
(via UpdateCacheMiddleware
, FetchFromCacheMiddleware
):
Async Method | __acall__ |
Async version of __call__ that is swapped in when an async request is running. |
Method | __call__ |
Undocumented |
Method | __repr__ |
Undocumented |
Class Variable | async |
Undocumented |
Class Variable | sync |
Undocumented |
Instance Variable | get |
Undocumented |
Method | _async |
If get_response is a coroutine function, turns us into async mode so a thread is not consumed during a whole request. |
Instance Variable | _is |
Undocumented |