New to Telerik ReportingStart a free 30-day trial

Provides factory methods for creating cache providers used by the Telerik Reporting engine and services.

Definition

Namespace:Telerik.Reporting.Services.Engine

Assembly:Telerik.Reporting.dll

Syntax:

C#
public static class CacheFactory

Inheritance: objectCacheFactory

Methods

Creates a new instance of a database cache that stores cached data in a database.

C#
public static ICache CreateDatabaseCache(string backendName, string connectionString)
Parameters:backendNamestring

The name of the database engine to use (e.g., "MSSQL", "SQLite").

connectionStringstring

The connection string used to connect to the cache database.

Returns:

ICache

An ICache implementation that stores cached data in a database.

Remarks:

To use a database cache, first create the underlying database and schema using the Database Cache Configuration Tool. The database cache implementation relies on Telerik OpenAccess ORM, so the following assemblies must be referenced: Telerik.OpenAccess.dll, Telerik.OpenAccess.35.Extensions.dll. Proper assembly binding redirects may be required. For more information, see: Configuring the Database Cache Provider

Creates a new instance of a file-based cache in a temporary folder.

C#
public static ICache CreateFileCache()
Returns:

ICache

An ICache implementation that stores cached data in a temporary directory.

Creates a new instance of a file-based cache that stores cached data in the specified directory.

C#
public static ICache CreateFileCache(string directory)
Parameters:directorystring

The directory path to be used by the cache as its storage repository.

Returns:

ICache

An ICache implementation that stores cached data in the specified directory.