From tapestry-user Wed Nov 28 11:37:04 2007 From: Kaspar Fischer Date: Wed, 28 Nov 2007 11:37:04 +0000 To: tapestry-user Subject: Caching: dependency on session data [OT?] Message-Id: <811A5079-5182-49D7-97C1-D22692C338DB () inf ! ethz ! ch> X-MARC-Message: https://marc.info/?l=tapestry-user&m=119624985920611 Dear All, I've tried to search for information on Tapestry's caching mechansism but could not find anything regarding depency on session data (like logged in users). Reading from http://www.nabble.com/RE%3A-Page-caching-nightmare-p3574110.html I understand that tapestry has its page pool but does not cache rendered pages. Is this correct? If so, my next question is slightly off-topic: How can I implement caching? Lots of data I display on my Tapestry pages is pulled from a DB and this might be expensive. I see two approaches: * Caching "in front of T": use some page cache that caches the HTML output by T * Caching "behind T": use a caching layer between T and my DB The first approach seems easier but becomes complicated as soon as my pages depend on session data (e.g., the page displays the name of the logged in user -- you'd have to use a per-user page cache). Because my pages change frequently, I need -- in both approaches -- a cache that allows "dependencies". That is, the cache should not just be a (stored) hash-map but each stored entry may have a list of dependent pages: If one of the latter changes, the entry in the cache gets invalidated. For instance, page A depends on content from no other page, page B depends on {A} (because it links to it, showing its title, for instance), page C depends on {A, B}. After some time, all three pages are cached. If I change B, then the cache should invalidate B and C but should leave the cache entry for A in the cache. Does anybody have any experiences with a mechansism like this? Are there any caching libraries out there that accomplish this? Many thanks and please excuse the slightly off-topic nature of this post. Kaspar --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org For additional commands, e-mail: users-help@tapestry.apache.org