Show TOC

 CachesLocate this document in the navigation structure

Use

You use caches for various kinds of content and metadata in CM.

Note

Caches temporarily store data that is exchanged between components. They are used to reduce access times and to expedite the transfer of data.

Integration

Caches are used by services and repository managers. You must make sure that any caches that you specify in the configuration of repository managers or services are properly configured. More information: Components and Their Caches ).

However, for new repository managers that you set up in your system environment, you also need to create new caches.

You can use the Cache Monitor to check the function of the cache used.

Features

Two kinds of caches are supported:

  • Memory caches (data is stored in the main memory)
  • Persistent caches (data is stored in the file system)

Memory Caches

The table below lists the parameters of a memory cache.

Memory Cache Parameters

Parameter Required Description

Name

Yes

Name of the cache.

Restart Lifetime on Access

No

Extends the lifetime of cache entries and prevents entries that are still needed from being deleted from the cache.

A cache normally automatically discards entries that have reached a certain age. This age can be specified in the configuration of a cache. It can also be specified by the software that uses the cache when an entry is set in the cache.

Sometimes, entries ought not be deleted, since they are still being accessed. This is especially true for caches that contain objects that do not change often or that are used by an application that does not rely on current data.

Singleton

No

Instantiation type of cache.

If singleton is activated, the memory is only reserved once for the cache. All components that use the cache can also use the objects in the cache.

If a cache is in singleton mode, it is shared by all the components that use it. Therefore, the limit of number of elements that the cache can hold is reached much faster and the cache must be configured accordingly so that it can accommodate the relevant cached data.

Caution

The sharing of the cache might result in cache entries being overwritten and loss of data. For example, if two clients (repositories of custom applications) use the same key to save a piece of data in the cache, the latter entry overwrites the first one. Make sure that the keys you use to store data in a singleton cache are unique.

If a cache is not a singleton, this memory is reserved especially for each component that uses it. The components cannot then access the objects of another component that are contained in the cache.

Assumed Entry Size

Yes

Size in bytes that a new cache entry is assumed to have if no other size is specified by the system that uses it.

Capacity

Yes

Cache capacity (that is, the maximum number of cache entries).

Default Time-to-Live

Yes

Default time in seconds after which a cache entry is automatically removed from the cache.

The value 0 means that the entry does not expire.

Max Cache Size

Yes

Maximum total size of all cache entries in bytes.

The value 0 means that the size is unlimited.

Max Entry Size

Yes

Maximum size of a cache entry in bytes.

The value 0 means that the size is unlimited.

 

Persistent Caches

The table below lists the parameters of a persistent cache.

Persistent Cache Parameters

Parameter Required Description

Name

Yes

Name of the cache.

Filename Prefix

Yes

Prefix of the cache file names.

Folder

Yes

Folder in which the cache files are stored (must already exist).

Clear Cache on Init

No

Initialization type of cache.

Activate this parameter if the cache is to be reset when initialized.

Restart Lifetime on Access

No

Extends the lifetime of cache entries and prevents entries that are still needed from being deleted from the cache.

For a more detailed description of this parameter, see the table above.

Secure

No

Security type of cache.

Activate this parameter if you want to use an encrypted cache.

Capacity

Yes

Cache capacity (that is, the maximum number of cache entries).

Default Time to Live

Yes

Default time in seconds after which a cache entry is removed from the cache automatically (0 means no expiration).

Max Cache Size

Yes

Maximum total size of all cache entries in bytes.

Max Entry Size

Yes

Maximum size of a cache entry in bytes.

 

Activities

To create a cache or change the configuration of an existing one, choose Content Management → Utilities → Caches.

More information: Components and Their Caches