0% found this document useful (0 votes)
38 views1 page

CDNetworks Cache+Controller+-+Service+Note

The Cache Controller provides tools for companies using a CDN to manage caching of content at the CDN edge. It allows setting cache control rules through regular expressions to specify caching durations for different types of files. Rules are applied in order to URLs that match patterns but do not already have cache control headers from the origin. This helps companies control caching when they cannot modify headers directly at the origin server.

Uploaded by

Weiyang Wang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views1 page

CDNetworks Cache+Controller+-+Service+Note

The Cache Controller provides tools for companies using a CDN to manage caching of content at the CDN edge. It allows setting cache control rules through regular expressions to specify caching durations for different types of files. Rules are applied in order to URLs that match patterns but do not already have cache control headers from the origin. This helps companies control caching when they cannot modify headers directly at the origin server.

Uploaded by

Weiyang Wang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Service Note: Cache Controller

Introduction
Companies that utilize CDNs must ensure that the objects are kept in cache for the appropriate amount of
time. CDNetworks has developed a system to utilize existing standard cache-control headers and also
flushing tools for easiest integration and cache management. Yet, often it is difficult for companies to set the
cache-control headers on their origin themselves. To help those companies, CDNetworks has developed
the Cache Controller.

Overview
The Cache Controller provides complete management of objects delivered through the CDNetworks CDN.
The main functions include:
• Providing an interface to flush objects from the cache
• Setting cache-control rules

To read more about using the flush aspect, please see the Cache Flush Service Note.

Cache control rules can be set at the CDNetworks cache. In order to do so, the following conditions must
apply:
• Origin server is responding to the object request with a 200 or 206 HTTP response code
• Origin server does NOT have a “Cache-Control: max-age=” or “Expires:” HTTP header.

If the conditions above are met, a Cache-Control: max-age=[seconds] can be applied by deciding on what
the [seconds] value should be by using regular expression matching. Please note that the first pattern that
matches is what is applied to the URL.
• Regular expression
o This is the pattern to find the object in which to apply the cache-control rule.
o If multiple rules are used, they are applied one at a time from top to bottom. If a regular
expression pattern matches, the rule is applied. After it is applied, processing of assigning a
cache-control value stops and subsequent rules are ignored.
• Example: \/.*\.jpg 86400
o This means give all files with the extension jpg a Cache-Control: max-age=86400.
o Therefore, CDNetworks will keep the file in cache for 86400 seconds before checking with
the origin on whether or not it has been updated.

Implementation
1. Write down for your own reference the regular expressions you want to match on and the default value
in seconds for each. Remember that the ordering of the rules matter when using more than one.

Regular Expression Value for [seconds]


1)
2)
3)
4)
5)
6)
7)
8)

2. In the Caching Tab of the Online IQ, go to the Cache Controller max-age rules section. Place one rule
per line. Each rule will begin with the regular expression, then a single space, followed by the max-age
desired in seconds. E.g.,
\/.*\.jpg 604800
\/.*\.js 86400
3. Request implementation of the Production Accelerated Domain (PAD) noting in the comments section
that Cache Controller Rules must be applied.
4. CDNetworks will send an email confirming that the implementation is completed.

v. 2.1 CDNetworks Page 1 of 1


Proprietary and Confidential Mar 09

You might also like