How does file caching work?

Answers to common Plum DEV questions

Moderators: admin, support

  • Author
  • Message
Offline

support

  • Posts: 3628
  • Joined: Mon Jun 02, 2003 3:47 pm
  • Location: Boston, MA

How does file caching work?

PostFri Jun 06, 2003 11:39 am

When a file is requested from the proxy cache, the proxy cache first checks to see whether the file is currently stored locally. If so, it then checks when the local copy of the file is set to expire. If the local has not expired, it is immediately sent back to the platform. If the local copy has expired, the proxy cache requests only the status of the file from the source site. If the source copy has not been changed, the local copy of the file is sent back to the platform. If the source copy has been changed, the proxy requests the contents of the file from the source site and "refreshes" the local copy.

The behavior of the proxy cache can be modified in two ways. First, the maxage attribute of any of the tags that make web requests can be set to a number of seconds that will override the expiration time for the local copy of the file. If, for instance, maxage is set 0, the proxy cache will always check the status of the file from the source site.

Second, the maxstale attribute can be set to a number of seconds to extend the "life" of a cached file. If the cached file would have expired 120 seconds ago, but maxstale is set to 300, the local cached file will be sent back to the platform without first verifying the status of the file from the source site.

Return to Plum DEV FAQs

Who is online

Users browsing this forum: No registered users and 1 guest

cron