• Post Reply Bookmark Topic Watch Topic
  • New Topic

retrive cache data for every request

 
syams sundars
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai friends

any one having the related coding pls send any related coding

1. I am using servlet and xml, i parse the xml file and read the data and diplay this data depending upon requests.here update cache data for every 1 minute from xml

2.i want retrive the cache data for every 2 minute when i needed
using doGet method if i refresh the browser with in 2 minutes dont read xml files on each user request(read cache data).

advanced thank who give the coding for this......

thank you
sundaras
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not quite sure what you want to do every minute or every other minute, but if you read the XML file into a DOM Document, you can store it as a context attribute. You could then start a TimerTask that reloads it every N minutes.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!