clintecker / django-chunks

Think of it as flatpages for small bits of reusable content you might want to insert into your templates and manage from the admin interface.
http://github.com/clintecker/django-chunks
BSD 3-Clause "New" or "Revised" License
304 stars 101 forks source link

Chunks are cached forever by default #4

Open niran opened 13 years ago

niran commented 13 years ago

If you don't pass a cache timeout to {% chunk %}, the chunk contents will be cached forever (or until the cache runs out of space). I can't see how this would ever be desirable behavior. The chunk is being stored in the database so it can be modified at will, yet the default behavior prevents that from taking effect. I'd recommend merging in carljm@8dcf287e to rip out the caching support altogether. Users who want to cache the chunk can wrap it in {% cache %}.

Alternatively, the Chunk model should clear the cached value on save.

JoeJasinski commented 12 years ago

I'm working on a fix to clear each cache key on save. I need to test still. My work can be found here.

https://github.com/imagescape/django-chunks/tree/develop