New to Telerik ReportingStart a free 30-day trial

cache Element Overview

The Cache element specifies the configuration settings for the cache management system which is utilized by the viewers to store and cache rendered pages and resources.

Attributes and Elements

<cache> element

Attributesprovider – required string attribute. Specifies the name of the current active cache provider used by the viewers. There are several preconfigured providers, although additional ones can be registered in this part of the configuration section. The following cache providers are available by default:
  • Auto - the actual provider is chosen automatically according to the characteristics of the stored resource and the permissions granted to the application;
  • Memory – specifies that the rendered pages and resources are stored in memory;
  • File – specifies that the rendered pages and resources are stored as temporary files in the file system;
  • IsolatedStorage – specifies that the rendered pages and resources are stored as temporary files in the isolated storage.
Child elementsproviders – specifies a collection of cache providers to register for use in the application. Only one Provider child element can be used inside the Cache parent element.
Parent elementTelerik.Reporting – specifies the root element of the Telerik Reporting configuration settings. Only one Cache child element can be used inside the Telerik.Reporting root element.

<providers> element

The Providers element specifies a collection of cache providers to register for use in the application.

AttributesNo attributes are defined for this element.
Child elementsprovider – specifies a cache provider to register for use in the application. Multiple Provider child elements can be used inside a single provider parent element.
Parent elementcache – specifies the configuration settings for the cache used by the viewers. Only one Provider child element can be used inside the Cache parent element.

<provider> element

The Provider element specifies a cache provider to register for use in the application.

Attributesname – required string attribute. Specifies a unique name to identify the cache provider in the configuration section. The active cache provider specified by the provider attribute of the Cache element should match one of the names specified by this attribute.
Child elementsparameters – specifies a collection of parameters for the current cache provider. Only one parameter child element can be used in the provider parent element.
Parent elementproviders – specifies a collection of cache providers to register for use in the application. Multiple provider child elements can be used inside a single provider parent element.

Examples

All parameters and attributes for the available cache providers may be seen in the article Configuring the Cache Management System.

The Auto Cache Provider

This is the default cache provider. When the Cache section is omitted from the Telerik.Reporting configuration, or the BasePath is not specified, the Reporting engine utilizes the temporary folder of the current user.

XML
<configuration><Telerik.Reporting>
		<cache provider="Auto">
			<providers>
				<provider name="AutoProviderName">
					<parameters>
						<parameter name="BasePath" value="C:\MyDataCache" />
					</parameters>
				</provider>
			</providers>
		</cache>
	</Telerik.Reporting></configuration>

The File Cache Provider

When the BasePath is not specified, the Reporting engine utilizes the temporary folder of the current user.

XML
<configuration><Telerik.Reporting>
		<cache provider="File">
			<providers>
				<provider name="FileProviderName">
					<parameters>
						<parameter name="BasePath" value="C:\MyDataCache" />
					</parameters>
				</provider>
			</providers>
		</cache>
	</Telerik.Reporting></configuration>

The Memory Cache Provider

XML
<configuration><Telerik.Reporting>
		<cache provider="Memory">
			<providers>
				<provider name="MemoryProviderName" />
			</providers>
		</cache>
	</Telerik.Reporting></configuration>

The IsolatedStorage Cache Provider

XML
<configuration><Telerik.Reporting>
		<cache provider="IsolatedStorage">
			<providers>
				<provider name="IsolatedStorageProviderName" />
			</providers>
		</cache>
	</Telerik.Reporting></configuration>

The Database Cache Provider

XML
<configuration><Telerik.Reporting>
		<cache provider="Database">
			<providers>
				<provider name="DatabaseProviderName">
					<parameters>
						<parameter name="BackendName" value="DatabaseProviderBackendName" />
						<parameter name="ConnectionString" value="DatabaseProviderConnectionString" />
					</parameters>
				</provider>
			</providers>
		</cache>
	</Telerik.Reporting></configuration>

The ADO.NET Cache Provider

XML
<configuration><Telerik.Reporting>
		<cache provider="ADO.NET">
			<providers>
				<provider name="ADONETProviderName">
					<parameters>
						<parameter name="ProviderName" value="ADONETProviderProviderName" />
						<parameter name="ConnectionString" value="ADONETProviderConnectionString" />
					</parameters>
				</provider>
			</providers>
		</cache>
	</Telerik.Reporting></configuration>