On Tue, 9 Jan 2001, Elman Vagif Abdullaev wrote:
> dynamic caching is to have some sort of script or module that will
> check if the data stored on the proxy server is outdated. It will
> check if the data in the database that was used to generate the
> responce to some query was chenged and therefore data in proxy is not
> valid anymore. If it was changed then we again go to database and
> generate the responce.

That only makes sense if you can test whether or not the data was changed
much more quickly than you can actually re-generate the page.  IN most
cases, the point of the cache is to avoid going to the database in the
first place.  A better idea might be to have a background process that
checks your database every few minutes to determine what has changed and
deletes anything in your proxy cache that contains that cached
data.  Users may get slightly out of date data using this method, but it's
much faster than going to the database every time.

By far the simplest approach is to just set a time-to-live (TTL) on each
page using Expires headers and let mod_proxy or Squid worry about removing
the page after that.  But the approach you choose must be appropriate to
the type of data you have and how often it changes.

- Perrin

Reply via email to