The user directory employs standard ATG SQL repository caching techniques as described in SQL Repository Caching in the ATG Repository Guide. By default, caching is turned off for all user directory item descriptor types.

Each item descriptor type in the user directory has a corresponding cache component that maps repository IDs to persistent repository items. The cache component is identified in the Caching section of the ProfileUserDirectory.properties file. For example, in the default file, the property userCache points to the atg/userprofiling/userCache component (class atg.service.cache.Cache).

The default properties file for the userCache component is shown in the following example:

$class=atg.service.cache.Cache

# caching is off by default
cacheAdapter=/atg/userprofiling/userCacheAdapter

The properties you can set for the userCache component are shown in the following table:

Property

Default Value/Description

cacheAdapter

The Nucleus address of the adapter that retrieves items not found in the cache.

Default: /atg/userprofiling/userCacheAdapter

maximumCacheEntries

The maximum number of entries in the cache.

0 = cache nothing. Always get objects from the cacheAdapter.

-1 = unlimited (Default)

maximumCacheSize

The maximum number of bytes in the cache.

0 = Cache nothing. Always get objects from the cacheAdapter.

-1 = Unlimited (Default)

maximumEntryLifetime

The maximum time, in milliseconds, that an entry can exist in the cache.

0 = cache nothing. Always get objects from the cacheAdapter.

-1 = cache entries never expire (Default)

maximumEntrySize

The maximum number of bytes in a single cache entry.

0 = cache nothing. Always get objects from the cacheAdapter.

-1 = cache entries never expire (Default)

Each cache component points to a corresponding cache adapter component, which retrieves items from the repository that are not in the cache. For example, as shown above, the userCache component points to atg/userprofiling/userCacheAdapter (class atg.userdirectory.repository.UserCacheAdapter). The following sample shows the default properties file for the userCacheAdapter component:

$class=atg.userdirectory.repository.UserCacheAdapter

userDirectory=/atg/userprofiling/ProfileUserDirectory