Limited and Unlimited Cache Size

Performance of the system is best when all the data is in cache, which can have unlimited or limited size.

If the amount of data exceeds the amount of memory available in the cache machines, you must limit the cache size and use a backing store to store additional data. Some applications use the backing store as the main storage and retrieve objects from the backing store as needed.

Note: Use of limited cache is supported only with the use of a backing store, which retains entries in excess of the limit. Without use of a backing store the following data inconsistencies could result:
  • Entries for an object in the object table (an internally used cache) and in the object cache itself could expire independently of each other.
  • Domain object settings for limited cache apply at the object level. Related concepts could have different settings. For example, a container concept could have a limited cache setting and its container concept an unlimited cache setting. Each could be evicted at different times.

With a limited cache, objects are evicted from the cache when the number of entries exceeds the limit. The Coherence cache provider uses a hybrid policy. TIBCO BusinessEvents DataGrid uses a Least Recently Used (LRU) policy.

A hybrid eviction policy chooses which entries to evict based on the combination (weighted score) of how often and how recently they were accessed, evicting first those that are accessed least frequently and have not been accessed for the longest time.

The evicted objects are transparently loaded from the backing store when needed by agents.

Note: Only use an unlimited cache if you deploy enough cache agents to handle the data. Otherwise out of memory errors may occur.

For backing store configuration, see JDBC Backing Store Setup in TIBCO BusinessEvents Developer’s Guide.