[Cppcms-users] managing caching with lists
Brought to you by:
artyom-beilis
From: Andrew <an...@bu...> - 2011-04-29 23:39:28
|
Hi all, so I have a table of item records, each of which can be viewed, edited and updated by id. /item/view/{item id} /item/edit/{item id} /item/update/{item id} I also have a controller that provides a list view /list/{page no} managing the caching for the item views is easy enough, I give each page a trigger that looks like cache().add_trigger("item_{item id}") and refresh the cache when the item is updated cache().rise("item_{item id}") but I am having trouble finding a non-complicated way to manage the caching of the list view, I have solved it temporarily by simply refreshing every page in the list entirely whenever an item is updated, but ideally I would like to find a simple algorithm that lets me only refresh the cache for the page on which the item that has been updated appears. because items are ordered by date modified, and can be added or deleted, which page the item appears on will change frequently. does anyone have a solution that they have found works for this kind of scenario? thanks all :) - Andrew Bush |