We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

How does file caching work?

Answers to common Plum DEV questions

Moderators: admin, support

Locked
support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

How does file caching work?

Post by support »

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.

Locked