cache

hello all ,how taglib supports dynamic cache using jsp tags.Any ideas!!!!!!!
[104 byte] By [phillip] at [2007-9-26 1:54:59]
# 1

Hi Phillip,

Here iam giving you example . Hopes it will help you.

Example:

<html>

<%

out.println(new java.util.Date());

%>

</html>

</cache:Cache>

Here calculation's results (HTML code) will be saved in the cache for 60 seconds. So for the each next request during that time client will get data directly from the cache (without the new evaluation for

tag's body).

Cached data may be persistent (in the above mentioned example it is described by the parameter store). Store is just an any existing directory on your server.

Each data chunk must have own unique key. Data are separated by the scope. You may cache data per sessions (actually it means caching per users) or per applications (actually it means caching for all

users).

Tags are:

Cache

This tag puts own body into cache or outputs cached data. Parameters are:

1) key data key (identification)

2) refresh cache refresh time (in seconds). Default value is 600.

3) scope Data scope. Possible values are: session or application. Default value is session

4) store any existing directory on your server. By default data are not persistent.

Regards,

Tirumalarao

Developer Technical Support,

Sun Microsystems,India.

rao_indts at 2007-6-29 3:08:14 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...