Genpact Cora Knowledge Center

Support

Runtime data caching

Overview

Cora SeQuence runtime data caching can improve performance, scalability, and availability. Caching is especially recommended when a large number of users need to constantly access the same set of data. Caching stores reusable data sets to speed up repeated requests. 

Define caching settings for data that is accessed frequently, but does not change frequently. 

Cache settings

Determine the type of data that is most appropriate to cache. To maximize caching benefits, it is a good practice to analyze usage patterns before you define caching settings.

PropertyDescriptionConsiderations
EnableDetermines if caching is enabled or not for the query.
This checkbox is not selected by default.

NameThe name of the query.
TypeDefines how the system caches data.
  • Absolute (default): cached data expires after the specified time interval. 
  • Sliding: data that has been accessed is kept in cache for additional time intervals. 
Select Absolute for data that does not need to be retrieved often.
Select Sliding for data that is retrieved often, but does not change often.
Interval (sec.)Time, in seconds, during which the data is cached.
Minimum value: 1 (second)
Default value: 300 (seconds)
Set the interval value carefully. If the interval is too short, the cached data expires too quickly. If the interval is too long, the cached data can become obsolete.
By ParameterSystem caches only data relevant to requested parameters.
Available for files and lookup tables.
This option saves bandwidth and storage space.
When selected, the cache does not store the entire query. It caches only the records related to the requested parameters.

Define cache settings for queries in the data model

For stored procedures, services, and files, you define caching settings at data model level: Define Data Model > Advanced Options > Caching tab

Define cache settings for lookup tables 

Because lookup tables can be used for different workflows, you define caching settings at the lookup table level: Lookup Table Properties  > Edit 

Set cache memory size

You configure caching memory size in the web.config file.  See example below for a 10 MB memory limit.

The value for the name attribute is "PNMsoft.Sequence.Data.Caching.EntityMemoryCache".

<configuration>
…
Other configuration stuff
…
<system.runtime.caching>
<memoryCache>
<namedCaches>
<add name="PNMsoft.Sequence.Data.Caching.EntityMemoryCache"
cacheMemoryLimitMegabytes="10"
physicalMemoryLimitPercentage="0"
pollingInterval="00:05:00" />
</namedCaches>
</memoryCache>
</system.runtime.caching>
</configuration>