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.
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
.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" />
configSource
attribute to reference an external configuration file is
kept web.config clean and uncluttered.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 whenThread.CurrentPrinciple
is not set. Default value istrue
.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-directivemax-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-directiveprivate
.-
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-directivemust-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:
|
Get |
AnalysisChannel |
GetAnalysis |
Only client caching is supported. Supported HTTP Cache-Control directives:
|
Get |
AnalysisChannel |
GetSettings |
Only client caching is supported. Supported HTTP Cache-Control directives:
|
Get |
Application Channel |
GetLogin Settings |
Only client caching is supported. Supported HTTP Cache-Control directives:
|
Get |
Application Channel |
GetStartup Data |
Only client caching is supported. Supported HTTP Cache-Control directives:
|
Get |
CalendarChannel |
GetItem |
Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
|
Get |
CalendarChannel |
GetItems |
Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
|
Get |
CalendarChannel |
GetStartOf |
Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
|
Get |
CatalogChannel |
GetCatalogs |
Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
|
Get |
Collaboration Channel |
GetHolidays |
Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
|
Get |
Configuration Channel |
GetActionItem |
Only client side caching supported. Supported HTTP Cache-Control
directives:
|
Get |
Configuration Channel |
GetChartTypes |
Server side caching (with ETag support) and client side caching supported.
Supported HTTP Cache-Control directives:
|
Get |
Configuration Channel |
GetTextKeys |
Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
|
Get |
Configuration Channel |
GetTexts |
Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
|
Get |
Favorites Channel |
IsFavorite |
Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
|
Get |
FormChannel |
Get |
Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
|
Get |
HeadersChannel |
GetHeader |
Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
|
Get |
JobsChannel |
Poll |
No cache | Get |
MenusChannel |
GetDefault Action |
Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
|
Get |
MenusChannel |
GetMenu |
Only client side caching. Supported HTTP Cache-Control directives:
|
Get |
MenusChannel |
GetQuickSearch |
Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
|
Get |
QueryChannel |
GetExpression Values |
Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
|
Get |
QueryChannel |
GetFilter |
Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
|
Get |
QueryChannel |
GetFilter List |
Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
|
Get |
QueryChannel |
GetFilters |
Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
|
Get |
QueryChannel |
GetFilterSets |
Only client side caching. Supported HTTP Cache-Control directives:
|
Get |
QueryChannel |
GetQuery |
Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
|
Get |
RepsChannel |
GetRepSets |
Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
|
Get |
RepsChannel |
Read |
Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
|
Get |
RepsChannel |
ReadMany |
Server side caching (with ETag support) and client caching supported.
Supported HTTP Cache-Control directives:
|
Get |
SchemaChannel |
GetInfoArea Schemas |
Only Client side caching supported. Supported HTTP Cache-Control directives:
|
Get |
SearchChannel |
GetQuick Searches |
Only Client side caching supported. Supported HTTP Cache-Control
directives:
|
Get |
SettingsChannel |
Find |
Only Client side caching supported. Supported HTTP Cache-Control
directives:
|
Get |
SettingsChannel |
Load |
Only Client side caching supported. Supported HTTP Cache-Control
directives:
|
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:
|
Get |