On Tue, 2009-04-07 at 09:48 -0700, Jade Rubick wrote:
> Why not use this algorithm:
> 
> 1) check if you have local cached copy, and if the date on it is
> within xx hours
> 2) if available, return it.
> 3) if not, retrieve remote copy.

The first critical question is if you can use caching. You can only use
it when it is okay to serve up old data, or to serve the same data to
multiple clients. 

The next question, assuming stale, or generic data is okay, is how often
should the cache refresh from the master source. 

But as Jade points out, the decision must be made at the level of the
cache, not by comparing sourrce to cache. 

There is another alternative. 

You can create an complete cache, a complete hard copy. Then you can
push updates to the cache. In this case, the cache is always served and
the update responsibility is offloaded to the master. 

That could be difficult if you can't predict all the changes which will
result from a particular update. But you actually have the same issue
either way, which it is usually difficult to cache dynamic
applications. 

Bottom line is that you delegate to the cache an acceptable
staleness/general applicability. But you can't expect a cache to catch
dynamic updates.

tom jackson


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
<lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to