Solutions

Does the SG cache multiple copies of an object?

Solutions ID:    KB3689
Version:    1.0
Status:    Published
Published date:    02/04/2010
 

Problem Description

Why is my SG fetching an object multiple times when it should already be cached?
Does the SG cache multiple copies of the same object?
How are variant objects handled?

Resolution

SGOS can identify the compression method of a response object
(retrieved from an Origin-Content-Server) and can store up to 3 variants of the object.

The 3 variants are: gzip, deflate, and identity (which means there is no compression being used).

If the Origin-Content-Server (OCS) returns a gzipped object, and it's cachable, it will be stored
in cache.  If a client requests a variant of a previously cached object, the SG will first check
if the variant is already cached.  If not, default behavior is to re-fetch the object and store the
retrieved object in cache.  Depending on your client requests, it's possible for each cachable
object to be fetched up to 3 times.

Sometimes the default re-fetching behavior of variant objects is undesirable.
Via Content Policy Language (CPL) this default behavior can be altered so the SG will only fetch
the object once from the OCS, and if a client requests a variant of an object that is already
cached- the SG will provide the client with the correct encoding "on the fly" without re-fetching
from the OCS.

To enable this behavior instead of the default, apply the following CPL using either the VPM or
within a policy file:

Via VPM:

  • Open VPM, add a NEW Web Content Layer (do not add a rule to an existing layer)
  • Set the Action column to a new "Set Client HTTP Compression" object
  • When the dialog box appears, the radio buttons will already be set properly
    Just click OK.
  • Install this new policy


Via CPL in a Policy-file:

-Add both a <Cache> layer-tag and this rule (as shown):

<cache>
 http.allow_compression(yes) http.allow_decompression(yes)


With this policy in place, the SG will automatically provide the correct variant of a cached object
to a client without re-fetching it from the OCS.


Rate this Page

Please take a moment to complete this form to help us better serve you.

Did this document help answer your question?
 
 
If you are finished providing feedback, please click the RATE CONTENT button. Otherwise, please add more detail in the following text box and then click RATE CONTENT.
 
 

Your response will be used to improve our document content.

Ask a Question