Class CacheFactory
Provides factory methods for creating cache providers used by the Telerik Reporting engine and services.
Inheritance
Namespace: Telerik.Reporting.Services.Engine
Assembly: Telerik.Reporting.dll
Syntax
public static class CacheFactory
Methods
CreateDatabaseCache(String, String)
Creates a new instance of a database cache that stores cached data in a database.
Declaration
public static ICache CreateDatabaseCache(string backendName, string connectionString)
Parameters
|
System.String
backendName
The name of the database engine to use (e.g., "MSSQL", "SQLite"). |
|
System.String
connectionString
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
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
public static ICache CreateFileCache(string directory)
Parameters
|
System.String
directory
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. |