Class
CacheFactory

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:

cs-api-definition
public static class CacheFactory

Inheritance: objectCacheFactory

Methods

CreateDatabaseCache(string, string)

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

Declaration

cs-api-definition
public static ICache CreateDatabaseCache(string backendName, string connectionString)

Parameters

backendName

string

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

connectionString

string

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

CreateFileCache()

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

Declaration

cs-api-definition
public static ICache CreateFileCache()

Returns

ICache

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

CreateFileCache(string)

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

Declaration

cs-api-definition
public static ICache CreateFileCache(string directory)

Parameters

directory

string

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.