Progress® Telerik® Reporting R3 2018

Configuring Custom Cache Provider

Important note Important

The cache settings mentioned in this article are not obligatory, and they do not apply to the HTML5 Viewer or its Angular, WebForms and MVC wrappers. Details about the Cache Storage of the Reporting REST Service that works with the HTML5 Viewer are available in Cache Management: HTML5 Report Viewer and Reporting REST services and REST Service Storage Settings.

Except the preconfigured cache providers, additional providers can be used. To do that create a MyCache class that implements the Telerik.Reporting.Cache.Interfaces.ICache interface. Then implement the Telerik.Reporting.Cache.Interfaces.ICacheProvider interface and its only method should return a new instance of the MyCache class.


public class MyCacheProvider : Telerik.Reporting.Cache.Interfaces.ICacheProvider
    public Cache.Interfaces.ICache CreateCache(System.Collections.IDictionary parameters)
        return new MyCache(parameters);
public class MyCache : Telerik.Reporting.Cache.Interfaces.ICache
    readonly System.Collections.Generic.IDictionary<string, byte[]> cache;

    public MyCache(System.Collections.IDictionary parameters)
        // The 'parameters' dictionary is initialized from the Telerik.Reporting/Cache configuration section.

        this.cache = new System.Collections.Generic.Dictionary<string, byte[]>();

    public bool HasValue(string key)
        return this.cache.ContainsKey(key);

    public byte[] GetValue(string key)
        return this.cache[key];

    public void SetValue(string key, byte[] value)
        this.cache[key] = value;

    public void Clear()

    public void Dispose()

To register this new provider set the provider attribute of the "Cache" element to the class name which implements ICacheProvider. Under "Providers" child element of the "Cache" element, create a "Provider" element with the same name attribute as the provider attribute of the "Cache" element. The type attribute should be the assembly qualified name of MyCacheProvider type. The following code snippet demonstrates how to configure such custom provider:

  <Cache provider="MyCacheProvider">
      <Provider name="MyCacheProvider" type="MyNameSpace.MyCacheProvider, AssemblyName, Version=, Culture=neutral, PublicKeyToken=null">
          <Parameter />

See Also

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article