Usually, I need to construct a simple cache pipeline to optimize database 
access using low-level cache API (django.core.cache).

I think we could use a decorator as such to ease this process:

cached_context(key, *, timeout, cache)

I know higher-level utilities exist such as cache_page, however I think the 
decorator above provides more granularity over what to cache. For example, 
I usually need such decorator in model methods where I do some database 
aggregation operations based on the instance.

What do you think?

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/facbcfa8-2404-4dc6-b56d-eb0f25ba491cn%40googlegroups.com.
  • A g... suayip uzulmez
    • ... 'Adam Johnson' via Django developers (Contributions to Django itself)
      • ... suayip uzulmez
        • ... suayip uzulmez
          • ... Diederik van der Boor
            • ... suayip uzulmez

Reply via email to