tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Parsons Technical Services" <>
Subject Re: Pagecache framework?
Date Sun, 09 Jan 2005 19:35:57 GMT
One other aspect to think about that will help, is to consider the cause of 
the dynamic.

If the difference in the page is due to the client then that page would need 
to be current data. But if the dynamic nature if from an outside change and 
the client has no affect on the content, then the question would be how 
often the page should be updated.

Adding a layer and using it for this makes sense.

I used a persistent object that would query the database and create the body 
of the page, storing it as a string. Then when the client did a request the 
page did a request to the object for the string, inserted it as the body and 
served it back to the client. The object would query the database every five 
minutes to get current data.

To take this one more step would be the creation of Beans with listeners. 
Then when a change to the database was made that affected that page it would 
trigger the listener and the bean would do a query and update the 
page/body/string/etc that it stores.

Now if this model exist I would love to know before I build it next month.

So if your client does not change the query, do the query and store the page 
and or body.

I wrote the object in about 4 hours one night after one of my sites was 
brought down from too much unexpected traffic.

The nice part with these as solutions, it doesn't rely on any external 
program and thus you could run on Tomcat only.

Just another option to consider.

$0.015   Everyone says I've lost half my sense.


----- Original Message ----- 
From: "QM" <>
To: "Tomcat Users List" <>
Sent: Sunday, January 09, 2005 1:25 PM
Subject: Re: Pagecache framework?

> On Tue, Jun 07, 2005 at 08:12:13PM +0200, Mieke Banderas wrote:
> : What should I look for if I want a simplistic system for avoiding trips
> : to the DB for pages that are only built upon and between changes are 
> 100%
> : similar? Is there a cache framework I should look into or could I use
> : something even simpler? After all, most pages only occasionally have 
> true
> : dynamic needs. I suppose I'm looking for something like a publishing
> : system, only much much simpler, especially on how much resources (and
> : coding) it would need.
> So are you looking to cache *pages* (generated HTML content) or simply
> *data* (information pulled from the DB that is manipulated by the
> presentation layer)?
> For the former, there are ways to make the Apache httpd a content
> caching engine.  This works well if the content you'd like cached is
> global -- that is, not tied to a specific user or group login.  (You
> could also use webDAV for this._
> For the latter, you could roll your own persistence caching framework or
> look into something such as IBatis or Hibernate that will do the grunt
> work for you.  If your code has uniform, centralized, abstracted data
> access then slipping in another layer between your app and the database
> shouldn't require much in the way of noticeable changes.
> -QM
> -- 
> software  --
> tech news --
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message