• 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

jsp caching and result caching in iAS

 
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
David,
How can i cache a JSP in iAS? can i explicitly configure iAS for result caching
 
Author
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are two distinct types of caching available in iAS: result caching and JSP caching.
Result caching is a mechanism where the KXS process keeps a cache of request results, if another request comes in with the same parameters the KXS returns the cached results without even passing the request into the JVM. (You can also tune which parameters are used to indicate a "match", how long before a cached item is discarded as stale, and how big the cache should be.)
To configure result caching for a JSP, you need to add a <caching> subelement to the deployment descriptor for that JSP in the ias-web.xml deployment descriptor. The exact details of the XML DTD are here
JSP caching actually happens in the JVM, and that allows for subsections of the JSP to be cached. (Part of a JSP could be cached and another part regenerated with every request.)
To use JSP caching, you utilize the iAS caching taglib. You enclose the part of the page to be cached with <cachelib:cache> tags (where cachelib is mapped to CacheLib.tld). You then use <cachelib:param>, <cachelib:criteria>, and <cachelib:check> tags to definate the cache criteria. Cachelib param defines simple "if these parameters match, use the cache" rules. If you need something more sophisticated, Cachelib check defines a Java class that is called to determine whether the cache should be used. (The Java class must support a simple interface that allows it to be use the request information to make a determination.) And cachelib criteria defines the cache timeout.
I actually wrote the JSP and result caching samples that are shipped with the application server. You can find the documentation for those samples here. They should be under $IAS_ROOT/ias/ias-samples/caching , if you have a server instance available.

[edited by Mike C to dispose of the smilie]
[ September 04, 2002: Message edited by: Mike Curwen ]
 
sridhar satuloori
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks David,
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic