Opened 6 years ago

Last modified 6 years ago

#29562 closed New feature

An idea for improving the template fragment cache — at Initial Version

Reported by: HongWeipeng Owned by: nobody
Component: Template system Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

There is a problem in using template fragment caching, that is, we need transfer data for template every time, even the data has been in cache.

If the data acquisition process is time consuming (such as 3 seconds), template caching has no helpful.

My idea is to allow provide a callback function to tell the cache how to get the data. and only call the function when cache expires.

I have tried it many times and found out how to make the simplest changes to complete this feature and ensure its compatibility.

Can you see this RP please? https://github.com/django/django/pull/10176

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top