• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Caching JSP/JSF page fragments - best practice?

 
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm trying to ascertain what's the best approach when designing JSP/JSF pages containing cacheable fragments. I've looked at WebSphere DynaCache, OSCache, and JBossCache for hints but the information is conflicting in some ways. One of the tips I keep seeing regarding J2EE applications is "design to the spec, not the application server". This is all well and good but caching dynamic content isn't part of the J2EE spec!

So my question is basically this. Do you create all cacheable and non cacheable fragments as autonomous JSP pages that can be uniquely identified by their URL and request parameters (as DynaCache requires), or do you rely on the fact you're caching solution / application server provides a tag lib that enables you to carve up individual pages?

I can see the benefits of having autonomous JSP pages (as described in Composite View pattern), but is there a danger this can become an anti-pattern when taken to extremes? Also, if you don't know what your target app server is when you're architecting a solution how do you decide?

Any thoughts would be greatly appreciated.

Jonathan
 
Screaming fools! It's nothing more than a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic