Matthieu Napoli
Matthieu Napoli

Reputation: 49583

Tapestry component cache

I have a component in my web application (the menu) that is rendered for every page, and it's useless and takes up resources.

Is there a way to put a cache on this component, so that its HTML output is cached?

Note: I already use EhCache, maybe there's a way to interface them?

Upvotes: 0

Views: 942

Answers (4)

Martin
Martin

Reputation: 38309

If this app is under extreme load you might want to consider using edge side includes. With a caching proxy such as Varnish you can then cache fragments of a page so that you won't have to regenerate those parts of the page on each request. There's a good explanation of the process in this article.

Upvotes: 0

Guillaume
Guillaume

Reputation: 11

Have a look at :

IOKO cache

Looks nice, even if I wished more flexibility to the cache names which are stuck to an Enum (CacheRegion)

Upvotes: 1

Howard M. Lewis Ship
Howard M. Lewis Ship

Reputation: 2337

Unless your component does some database access or other heavy work, there's no point in caching it; it would just be premature optimizations. Further, its best to cache the data used by the component, rather than attempting to cache the output of the component.

Upvotes: 0

Augusto
Augusto

Reputation: 29947

The company I work for created a Tapestry cache extension to do this. I haven't used in a while, but we used it on some quite big sites in the last few years and gave us some good results.

Upvotes: 1

Related Questions