My question is about best practices for caching database updates in Django.
I am writing a ticket system. I have a ticket model and an update model. Each time a user adds an update to a ticket, an update is created and linked as a foreign key to the ticket.
I have a TicketDetail view that shows Ticket description and related updates. Users can add updates from this view. I turned on caching on the site using memcached.
If a user adds an update and then reloads this view, they will not see the update for a while. I understand why, because I need to enable caching for each view and disable it for this view.
But in order to enjoy the full caching speed, I would really like it to be possible to enable caching for this view, but it is not valid to cache as soon as the user makes the update.
Is there an easy way to do this? Many thanks!
source
share