Actually, in my case, my dynamic page includes a template where the template is what I want to cache, can I just cache that template I want to include?
Thanks On Thu, Aug 7, 2014 at 8:45 AM, Collin Anderson <[email protected]> wrote: > a) Find a cheap way of detecting data changes by looking at e.g. a >> timestamp in the database. Then, render the page from scratch if there was >> a change, or serve a cached version using the Django cache framework if >> there was no change. > > You could, for example, have any change in the admin clear the cache > > b) Put the fully rendered page in cache server-side using the Django cache >> framework (or Varnish), and add a hook into the code that updates the >> database, which invalidates the cache on updates. You can either update the >> cache eagerly (force a cache insertion after the invalidation) or lazily >> (when a user requests the page), depending on your needs. > > I personally use nginx's proxy_cache for this. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/750fc613-0e7e-4917-ba3f-2753aab01d04%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/750fc613-0e7e-4917-ba3f-2753aab01d04%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- ⚡ Chen Xu ⚡ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACac-qYYW5T%3D%2BGmukeeivUp1YTCVsAYfvRacu2iEkh3kGWNJrg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

