Object Oriented Databases Cache
Cache: Objectivity/DB provides a client-side cache for its Java, C++ and Smalltalk applications. Having the cache on the client side has the following advantages:
- Allows more flexibility – each client can have one or more caches for its own data
- Faster – avoids network slowdown when using cached objects
- Reduces traffic on the network
Server-side cache is less important for Objectivity/DB than for other architectures, since Objectivity/DB is less dependent on large indexes that need to be kept in cache.

An application first makes a connection to the federation and then creates at least one session. Each session has a memory cache associated with it whose size (initial and maximum number of pages) is set from an application parameter.
When a persistent object is accessed in an Objectivity/DB application, Objectivity/DB’s kernel (provided as a shared library linked to the client application) will check to see if the object’s page is already in the session’s cache. If it is, Objectivity/DB simply provides the pointer in memory to the object and the operation is accomplished in a matter of a millisecond or less.
If the object’s page is not already in the cache, the object’s entire page is brought into memory1. Since Objectivity/DB allows clustering objects of different types together on a page, it’s very likely that related objects – ones likely to be needed by the application - will be fetched with the same read.
