W3C home > Mailing lists > Public > www-voice@w3.org > January to March 2004

Re: Question of interpretation on caching policies

From: Dave Burke <david.burke@voxpilot.com>
Date: Sun, 11 Jan 2004 13:24:38 -0000
Message-ID: <005301c3d846$43b6a720$0a01a8c0@db01.voxpilot.com>
To: "Wayne Phillips" <wayne.phillips@intervoice.com>, <www-voice@w3c.org>
Cc: "Skip Cave" <skip.cave@intervoice.com>
Hi, Wayne.

In general, a cache will know the "current age" of an object and also its "freshness lifetime". A cache considers an object to be "fresh" if its "current age" < "freshness lifetime". Setting the Cache-Control: max-age header in a HTTP response is a typical way to alter the "freshness lifetime" - i.e. one usually relies on server-side techniques (which are authorative) to manipulate a cache's interpretation of age and freshness lifetime. 

The purpose of the VoiceXML maxage and maxstale set of attributes and corresponding properties is to provide additional control at request time. They are typically used to *override* the default caching behaviour and are modelled on their use in HTTP request headers. The maxage request setting can force a cache to consider an object "stale" sooner than it would otherwise - e.g. maxage="0" is often used to force the latest version of a resource to be fetched. The maxstale request setting can force a cache to consider a resource to be "fresh" for longer than it would otherwise.

Looking at your interpretations below, your sentence re. how the maxage and maxstale settings are applied on the requests is correct: "L1 is fetched and cached under the platform default caching rule. R is fetched, cached under the platform default caching rule, and run. L1 is run (documentmaxage set). L2 is fetched and cached under the new documentmaxage caching rule". Interpretation 1 is correct assuming the HTTP response headers signalled that L2 is fresh for at least 90 seconds (i.e. that L2 is not fetched a second time has nothing to do with the use of documentmaxage on the first call).

In Interpretation 2, the sentence "the use of documentmaxage specifies the rule for storing this document and subsequent documents in the cache" is incorrect. The documentmaxage is a request setting and as such is only applied at request time - it does not affect how the cache stores the document. The documentmaxage must be applied (as an attribute on the <goto>/<submit> or as a document- or application-scoped <property>) for each subsequent request for it to have an effect.

Hope this helps,

Dave
  ----- Original Message ----- 
  From: Wayne Phillips 
  To: www-voice@w3c.org 
  Cc: Skip Cave 
  Sent: Thursday, January 08, 2004 9:26 PM
  Subject: Question of interpretation on caching policies


  I wonder if you could help us in a question of interpretation of caching policies. There are two potential interpretations of the use of the documentmaxage, documentmaxstale and similar caching properties.  These are:

  Interpretation 1 

  DocumentMaxAge does not overwrite platform defaults for the document containing property change

  These properties follow the normal scoping rules which mean that all fetches of a first document of the application will always follow the default fetch rules of the platform.  If documentmaxage is set within this first document, then subsequent documents will follow the caching rules specified by documentmaxage assuming the documentmaxage properties remains in scope.  However, the property will always be out of scope for the first document so subsequent fetches of the first document will always follow the platform default value for this property.  In otherwords, the documentmaxage will not overwrite the caching settings for a document after it was already fetched, only subsequent fetches of related documents.

  Example 1: 
  Assuming documentmaxage for platform is 1 minute)
  Application root document: R (does not set documentmaxage)
  Application first leaf doc: L1 (sets documentmaxage to 2 minutes)
  Application second leaf doc: L2

  L1 is fetched and cached under the platform default caching rule. R is fetched, cached under the platform default caching rule, and run. L1 is run (documentmaxage set).  L2 is fetched and cached under the new documentmaxage caching rule.

  New call starts at 90 seconds after first will fetch L1 and R but not L2.

  Interpretation 2

  DocumentMaxAge does overwrite platform defaults for document containing properties change

  The use of documentmaxage specifies the rule for storing this document and subsequent documents in the cache.  This means the first fetch of the first document will follow the platform default rule, with all later documents for that call session using the modified value.  But subsequent fetches of the first document will follow the modified caching value.

  Example 2: 
  Assuming documentmaxage for platform is 1 minute)
  Application root document: R (does not set documentmaxage)
  Application first leaf doc: L1 (sets documentmaxage to 2 minutes)
  Application second leaf doc: L2

  L1 is fetched and cached under the platform default caching rule. R is fetched, cached under the platform default caching rule, and run. L1 is run (documentmaxage set).  L2 is fetched and cached under the new documentmaxage caching rule.

  New call starts at 90 seconds after first call will fetch R (per 6.1.2.1) but not L1 or L2.

  Which is the correct interpretation?


  Regards

  Wayne Phillips
  Manager
  SWS Engineering
  Intervoice, Inc.
  E-mail:  wphillip@intervoice.com
  Direct Line :    +1 972 454 8658
  Main Office:    +1 972 454 8000

  www.intervoice.com
   
  This email and any files transmitted are intended for the addressee only - they are private and confidential.  If you have received this mail in error please notify the sender and immediately delete the email.  (c) 2002 Intervoice, Inc. All rights reserved. Registered office is: 17811 Waterview Parkway, Dallas, TX 75252, USA. 
Received on Sunday, 11 January 2004 08:24:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 30 October 2006 12:48:59 GMT