No description, website, or topics provided.
Switch branches/tags
Nothing to show
Pull request Compare This branch is 9 commits behind got5:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Based on ioko tapestry-commons project, check for further information.

Works with Tapestry 5.3.*

cache/Container component

This component provides caching of the generated HTML for a page snippet in EHCache. This is mainly useful if you have expensive (to render) areas of a page that you cannot fully cache (e.g. if the page is personalised).

Using ehcache as the cache backed gives you many options for configuration and management (e.g. you can use JMX to flush the caches).

How to use it?

Add this dependency in the pom.xml of your project:


Then, simply place the caching tag around your cachable content in your TML files.

<div t:id="cached" t:type="cache/Container">
	<dt>Time in cache</dt>

This will cache the content according for a 'medium' length of time.

You can specify short, medium or long cache times via the cacheRegion parameter

If your component renders different content depending on context you need to specify a cacheSuffix parameter to differentiate them.

<div t:id="personallyCached" t:type="cache/Container" t:cacheSuffix="username">
	<dt>Hi ${username} Time in cache</dt>


You don't need to configure the cache, but if you want to you simply create a ehcacheTapestryContent.xml and set the cache regions to cache as you want. This is a standard ehcache configuration file.

The components requires cache's called

  • content-short

  • content-medium

  • content-long


You must make sure you application server is NOT generating 'cookieless sessions' if your cached area includes any hyperlinks.