User manual

Chapter 2
14
against its original server to ensure that the cached copy of the
document is up to date. The method used to determine when to
refresh a document is described in the next paragraph.
Cached documents are refreshed after they expire. Documents
expire after they have been in the cache for a certain amount of
time. This amount of time is set for each document according to
the document’s Last-Modified timestamp. When a document
enters the cache, the CacheRaQ software calculates the difference
between the current time and the document’s Last-Modified
time. It multiplies this quantity by the Refresh Ratio; the result is
the amount of time that the document will exist in the cache
before being expired. Consequently, smaller values of Refresh
Ratio cause documents to expire sooner. This reduces the
likelihood that out-of-date documents will be served from the
cache, but it also increases the amount of HTTP traffic between
the CacheRaQ and the Web. With a Refresh Ratio of 10%, the
likelihood that any particular document will be out of date when
retrieved from the cache is under 1% (this is true in most
environments). In practice, users’ browser caches are much more
likely than the CacheRaQ to return out-of-date documents.
The third setting, Maximum Time Before Expiration, is the
upper limit on the amount of time that any document will exist in
the cache before being refreshed. This setting is used in
conjunction with the Refresh Ratio setting above. A cached
document will expire by the earlier of the two methods: Refresh
Ratio or Maximum Time Before Expiration.
The fourth setting, Maximum Size of Cacheable Documents,
specifies the largest possible cached document. This setting can
prevent exceedingly large documents from evicting many small
documents from the cache. A large value (say 20MB) is a good
setting — very large documents (e.g. multimedia files) are often
cacheable at this setting.
The fifth setting, Disk Space for Log Files, controls how much of
the CacheRaQ's disk space is devoted to storing log files. One log
file is generated each day — it’s used to generate the information
in the Cache Statistics section of the Web interface. It’s a good
idea to set a large value for this (several hundred megabytes),
enough for a month or two of log files. You may need to increase
this setting if users at your site generate heavy HTTP traffic.