This article mainly introduces the low-level cache API in the read Django framework. Django is the most popular Pythonweb development framework. For more information, see, caching the entire parsed page does not bring you too many benefits. In fact, it may be too late.
For example, a view in your site may depend on several time-consuming queries, and the results may change at intervals. In this case, the whole page cache provided by the site-level cache or view-level cache policy is not optimal, because you may not want to cache the entire result (because some data changes frequently), but you still want to cache the few changes.
In this case, Django provides a simple and low-level cache API. You can use this API to cache objects at any granularity you need. You can cache all Python objects that can be safely pickle processed: strings, dictionary, and model object lists. (Read the Python documentation to learn more.