Channels Output Cache Framework

Learn how to reduces the CRM server workload and improve the response time in high latent networks.

Aurea CRM.Web (Enterprise) provides output caching framework that reduces the CRM server workload and improve the response time in HIGH latent networks, by allowing you to cache the CRM web server output. Output cache framework takes care of server side caching and sets the appropriate client side (response) headers for a data channel decorated with cache output attribute.

Channel output cache framework decorates each channel's methods with CacheOutputAttribute attribute to make the method's output cacheable on server and client by design. To override the inbuilt cache output properties, you have to enable output caching first (disabled by default) and then override the CacheOutputAttribute properties using a channel's output cache configuration placed in the application configuration file, web.config in Aurea CRM application. In the web.config file, the cache output configuration is placed under the section update.web.channelOutputCaching of type ChannelOutputCachingConfigurationSection.
Note: A Channel refers to the pipeline used to retrieve configuration data, calendar data, data from the database, and similar information required for the various operations defined in the CRM server.

The following example shows the channel definition for a channel type with the cache output attribute elements defined in an external file (channelsOutputCaching.config).

<section name="update.web.channelOutputCaching" type="update.Web.Base.Contracts.Caching.Configuration.ChannelOutputCaching ConfigurationSection, update.Web.Base.Contracts"/>
...
<update.web.channelOutputCaching configSource="Configs\channelsOutputCaching.config" />  
Note: Using configSource attribute to reference an external configuration file is kept web.config clean and uncluttered.
The following example provides the output cache configuration elements for the FormChannel and configurationChannel channel types in the configuration file.
<update.web.channelOutputCaching enabled="true">
  <channels>
    <channel channelType="update.Configuration.Web.Channels.FormChannel, update.Configuration.Web" methodName="Get" enabled="false" />
    <channel channelType="update.Configuration.Web.Channels.ConfigurationChannel, update.Configuration.Web" methodName="GetTexts" enabled="true" noCache="true" clientTimeSpan="3600" serverTimeSpan="3600" mustRevalidate="true" anonymousOnly="false" private="true" excludeQueryStringFromCacheKey="false"/>
  </channels> 
</update.web.channelOutputCaching>

The cache output elements should be defined for each of the different data channel types for which you wish to enable client and server side caching for the output from different method calls. The different channel configuration attributes are described below:

  • channelType—specify the channel type whose output is to be cached. Mandatory element. For the list of channel types that support caching, see the table below.
  • enabled—enable or disable caching the output of the channel. Enabled by default.
  • methodName—specify the name of the method whose output is to be cached. Mandatory element. See the table below to get the names of methods that support caching in the list of channel types.
  • anonymousOnly—cache enabled only for requests when Thread.CurrentPrinciple is not set. Default value is true.
  • clientTimeSpan—time (in seconds) for which a response is cached on the client side. This corresponds to the HTTP Cache-Control general-header's cache-request-directive max-age (in seconds).
  • serverTimeSpan—time (in seconds) for which a response is cached on the server side.
  • private—ensures that a response is cached by the browser on the client side but is not cached by any intermediate caches like a proxy server. This corresponds to the HTTP Cache-Control general-header's cache-response-directive private.
  • mustRevalidate—ensures that the cache entry is not used after it becomes stale, when responding to a subsequent request without first revalidating it with the origin server. This corresponds to the HTTP Cache-Control general-header's cache-response-directive must-revalidate.
  • excludeQueryStringFromCacheKey—ensures that cache does not vary by querystring values. Default value is true.

The following table lists the channel types and the method names that support the output caching. The corresponding HTTP method is also pointed out.

Channel Type Method Name Implementation HTTP Method
Administration Channel GetSystemInfo Only client caching is supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds).
  • cache-response-directive: private and must-revalidate.
Get
AnalysisChannel GetAnalysis Only client caching is supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds).
  • cache-response-directive: private and must-revalidate.
Get
AnalysisChannel GetSettings Only client caching is supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds).
  • cache-response-directive: private and must-revalidate.
Get
Application Channel GetLogin Settings Only client caching is supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds).
  • cache-response-directive: private and must-revalidate.
Get
Application Channel GetStartup Data Only client caching is supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds).
  • cache-response-directive: private and must-revalidate.
Get
CalendarChannel GetItem Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds).
  • cache-response-directive: private and must-revalidate.
Get
CalendarChannel GetItems Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
CalendarChannel GetStartOf Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
CatalogChannel GetCatalogs Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
Collaboration Channel GetHolidays Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
Configuration Channel GetActionItem Only client side caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
Configuration Channel GetChartTypes Server side caching (with ETag support) and client side caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
Configuration Channel GetTextKeys Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
Configuration Channel GetTexts Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
Favorites Channel IsFavorite Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
FormChannel Get Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
HeadersChannel GetHeader Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
JobsChannel Poll No cache Get
MenusChannel GetDefault Action Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
MenusChannel GetMenu Only client side caching.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
MenusChannel GetQuickSearch Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
QueryChannel GetExpression Values Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
QueryChannel GetFilter Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
QueryChannel GetFilter List Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
QueryChannel GetFilters Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
QueryChannel GetFilterSets Only client side caching.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
QueryChannel GetQuery Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
RepsChannel GetRepSets Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
RepsChannel Read Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
RepsChannel ReadMany Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
SchemaChannel GetInfoArea Schemas Only Client side caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
SearchChannel GetQuick Searches Only Client side caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
SettingsChannel Find Only Client side caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
SettingsChannel Load Only Client side caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get
TableCaptions Channel Read Only server side caching supported. Post
TableCaptions Channel ReadBatch Only server side caching supported. Post
TypesChannel GetTypes Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
  • cache-request-directive: max-age (in seconds)
  • cache-response-directive: private and must-revalidate.
Get