----------------------------- Please read the FAQ! <http://java.apache.org/faq/> ----------------------------- I Just finished the first version of my implementation. Some of the pages will have longterm caching so I used my database Should work with all my servlets I call CacheWrapper?Servlet=servletname&A=1&B=2.... it saves the stuff after Servlet= as the primary key, dumps the content content type and timestamps it. Retrieval of cached pages is extremely fast right now but I don't have much in the cache. the reason I implemented it this way is so I can use it to cache Cold fusion pages, perl pages, whatever. Other sugestions? I still need some form of expiration (by hand at the moment) and to get it working for binary data. Most of the pages I'm caching are large datasets and queries that take 0.5-3minutes so I'm not sure a HashTable would work in this case. At this point I realize I'm off topic (the end) I just wondered of caching might be something in the works for the Servlet Spec, but now that I look at it it probably isn't hard enough to do to make it worth while. thanks Steve On Wed, 28 Jul 1999, jon * wrote: > > > This is similar to what I am doing. I have a Hashtable called cache that > > I stuff pages into, based on the request.getPathInfo(). I have a finite > > number of pages to put in, so memory constraints don't cause a problem > > (yet). > > My doGet() method starts of by checking the cache for the page, and > > builds it if it isn't in the cache. At this point it is simple, but I'd > > surely be interested in discussing the issue with others who are doing > > or considering it. Thanks. > > -mdf > > We did it essentially the same way. One thing you might want to do is > encapsulate the process with an object that defines things like the amount > of time to cache the data, etc. So, you have an object that has as its > private methods, things like "expire_time", "data", etc...then you put that > object into the Hashtable...you can then have a background thread that > expires the object from the hashtable if it is old. You can also implement a > size() attribute so that you can keep a running total of the amount of data > in the hashtable so that you don't run into memory constraints... > > of course there is a million ways to skin this cat...but that is a couple of > ideas to get you all started... > > -jon > -- -------------------------------------------------------------- Please read the FAQ! <http://java.apache.org/faq/> To subscribe: [EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] Archives and Other: <http://java.apache.org/main/mail.html/> Problems?: [EMAIL PROTECTED]