The class atg.repository.ItemDescriptorImpl provides three methods that can be called on an item descriptor in order to flush its cache. Each method provides an overloaded version with a boolean parameter, where an argument of true specifies to invoke the method across the entire cluster; an argument of false limits the flush operation to the local repository.

Note: If the item descriptor is set to distributed hybrid caching, any action on the local repository is propagated to other ATG instances, whether invoked by the boolean or non-boolean method version.

In order to use these methods, atg.repository.RepositoryItemDescriptor must be cast to atg.repository.ItemDescriptorImpl.

invalidateItemCache()
Invalidates item caches for this item descriptor:

void invalidateItemCache()
void invalidateItemCache(boolean pGlobal)

For example:

RepositoryImpl rep = getRepository();
ItemDescriptorImpl d = (ItemDescriptorImpl)rep.getItemDescriptor("user");
d.invalidateItemCache();

Note: This method’s boolean has no affect on remote item caches that use distributed TCP caching; it only invalidates the local item cache.

invalidateCaches()
Invalidates item and query caches for this item descriptor:

void invalidateCaches()
void invalidateCaches(boolean pGlobal)

removeItemFromCache()
Removes the specified item from the cache:

void removeItemFromCache(String pId)
void removeItemFromCache(String pId, boolean pGlobal)
void removeItemFromCache(
   String pId, boolean pGlobal, boolean pRemoveTransientProperties)

The version with the boolean parameter pRemoveTransientProperties forces removal of transient property values from the cache. The other method versions have no effect on these properties.

 
loading table of contents...