Telerik OpenAccess Classic

Telerik OpenAccess ORM Send comments on this topic.
Programmer's Guide > OpenAccess ORM Classic (Old API) > Programming With OpenAccess > Metadata Extension Reference > cache-strategy

Glossary Item Box

This documentation article is a legacy resource describing the functionality of the deprecated OpenAccess Classic only. The contemporary documentation of Telerik OpenAccess ORM is available here.

Controls how instances of a class are cached (refer to 2nd Level Cache for more information on the 2nd level cache, and refer to Backend Configurations for information on enabling the 2nd level cache) . This can be set at the datastore and the class level. The value set at datastore level becomes the default for all classes in that datastore. This extension is ignored if a cache is not being used.

Copy Code
<namespace name="BusinessObjects">
    <class name="Item">
        <extension key="cache-strategy" value="no" />

The valid values for the cache-strategy extension are as follows:




Do not cache instances


Cache instances


Read and cache all instances the first time an instance is read. This works well when the number of instances is small as reading them all in bulk is faster than individual on-demand reads.

By default the cache-strategy is set to "yes".