Hi,
I have a set of categories. Each category has a set of products.
A user can browse by categories. The product listing by category
provides pagination.
so I am using rails'' fragment cache to cache results like
/category/computers/page/1, /category/computers/page/2 in Memcached:
unless read_fragment({:page => params[:page] || 1, :category =>
params[:category]})
so whenever the system updates a product, I need to expire the related
category''s product listing pages. But I don''t know which
page the
product belongs to before it''s updated( say the listing is sorted by
product name, and the product name got updated ). so I don''t know
which pages to expire.
because of my use of memcached as the caching store, I can''t use the
regular expression to find caches.
so what''s a solution? keeping track of the page numbers that have been
viewed?
The last solution I want would be expire caches automatically after like
10 mins.
Thanks.
Yaxm
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---