← Prev in month ← Prev in thread

Caching of resources

From
Rich Thompson <>
Date
2007-02-22T20:33:18+00:00
ID
Thread
Caching of resources
Here is the proposal I promised to draft:

Rich Title: Cacheable Resources

  
  

    Next change

  6.3.1 Caching of resources

  
For performance reasons the
    Consumer might prefer to cache resources across a series of requests. The
    Producer passes information about the cacheability of the resource
    representation in the cacheControl
    structure returned in a MarkupContext
    structure. The Consumer can infer from this information when it may cache the
    resource and when the cached resource needs to be invalidated and updated by a
    new call to getResource. All of the cache semantics described in
    [Section 6.2.1]
    applies to the caching of resources as well.

  
In addition to Consumer caching,
    both browser and web-based caching may apply to the resource. Since resources can
    contain URLs which need to be written using either the template or Consumer URL rewriting
    techniques discussed in [Section
    10.2], the URI used by the browser to fetch the resource will likely contain state information
    which virtually guarantees the resource will not be retrieved from the cache on subsequent
    accesses. [Section 10.2.1.1.3.6]
    defines the wsrp-cacheableResource portlet URL parameter for the
    purpose of increasing the hit ratio for the browser and web caches of appropriate resources.
  

  
    
    10.2.1.1.3.6 wsrp-cacheableResource
  

  

    This boolean (default value is false) provides an indication to the Consumer that it
    can limit the amount of state it places on the URI for the resource such that the likelihood
    of a subsequent browser access being served from a browser/web cache is increased.
    This portlet url parameter can only be set to true if the resource contains no URIs
    referring back to the portlet and if the resource, when served using the
    getResource operation, does not require the Consumer to supply the
    navigationalContext structure. When the
    wsrp-cacheableResource portlet url parameter has a value of
    true, the Consumer SHOULD NOT include any
    navigationalContext structure on a related invocation
    of the getResource operation.
  

  

    Note that this portlet url parameter only impacts Consumer URL rewriting as the
    templates related to resource URIs have to allow for resources to access the excluded
    state/functionality.
  

  

    If both the wsrp-cacheableResource and
    wsrp-requiresRewrite portlet URL parameters are set
    to true, the Consumer MUST parse the resource for the purpose of rewriting
    namespace prefixing as per
    [Section 10.3].
  

  
    
    10.2.3 Extended BNF Description of URL formats
  

  

    These definitions utilize the syntax defined in ISO/IEC 14977
    [21]
  

  

    
      ConsumerURL = BeginToken (RenderURL | ActionURL | ResourceURL
      | ExtensionURL) EndToken
    
  

  

    BeginToken = "wsrp_rewrite?"
  

  

    EndToken = "/wsrp_rewrite"
  

  

    
       RenderURL = "wsrp-urlType=render" {("&" | "&amp;") (CommonPair | RenderPair)}
    
  

  

    
       ActionURL = "wsrp-urlType=blockingAction" {("&" | "&amp;") (CommonPair | ActionPair)}
    
  

  

    
       ResourceURL = "wsrp-urlType=resource" {("&" | "&amp;") (CommonPair | ResourcePair)}
    
  

  

    WSRPURLTypes = "render" | "blockingAction" | "resource"
    
  

  

    ExtensionURL = "wsrp-urlType=" (Text - WSRPURLTypes)
    {("&" | "&amp;") (ExtensionPair)}
    
  

  

    
      CommonPair = CommonTextPair | CommonBooleanPair
    
  

  

    
      CommonTextPair = CommonTextName "=" Text
    
  

  

    
      CommonTextName = "wsrp-fragmentID" | "wsrp-extensions"
    
  

  

    
      CommonBooleanPair = CommonBooleanName "=" BooleanValue
    
  

  

    
      CommonBooleanName = "wsrp-secureURL"
    
  

  

    
      RenderPair = RenderTextName "=" Text
    
  

  

    
      RenderTextName =  "wsrp-mode" | "wsrp-windowState"
                      | "wsrp-navigationalState" | "wsrp-navigationalValues"
    
  

  

    
      ActionPair = ActionTextName "=" Text
    
  

  

    
      ActionTextName = "wsrp-interactionState" | RenderTextName
    
  

  

    
      ResourcePair = (ResourceTextName "=" Text) | (ResourceBooleanName "=" BooleanValue)
    
  

  

    
      ResourceTextName = "wsrp-url" | "wsrp-resourceID" | "wsrp-resourceState"
    
  

  

    
      ResourceBooleanName = "wsrp-requiresRewrite" | "wsrp-preferOperation"
      | wsrp-cacheableResource"
    
  

  

    ExtensionPair = Text "=" Text
  

  

    Text = {
    "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" |
    "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" |
    "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" |
    "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" |
    "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" |
    "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z" |
    "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" |
    "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")" | "%" }
    
  

  

    
      BooleanValue = (("true" | "1") | ("false" | "0"))
    
  

  

     
  

  

    ProducerURLTemplate = {{Text} {ReplacementToken}}
  

  

    ReplacementToken = "{"  CommonTextName | RenderTextName
                     | ActionTextName | ResourceTextName | CommonBooleanName
                     | ResourceBooleanName | ParameterName "}"
  

  

    ParameterName = "wsrp-urlType" | "wsrp-portletHandle" | "wsrp-userContextKey"
                  | "wsrp-portletInstanceKey" | "wsrp-sessionID"
← Prev in month ← Prev in thread