Interpreting the low-level cache API in the Django framework

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.