Types of Cache Memory
Sterling B2B Integrator uses different memory cache types to run processes.
Memory Types | Description |
---|---|
Soft reference cache | When objects are removed from the memory cache in order to keep the memory cache size constant, they are moved to a soft reference cache, which can grow or shrink based on the available memory. If the JVM has to reclaim memory space, it takes it from the soft reference cache. |
Memory cache | Uses the amount of memory necessary to hold the objects in memory at all times. You can configure this in the noapp.properties file. |
Disk cache | Objects can be read more quickly from the disk than from the database. When objects are no longer in the soft reference cache because they have been garbage collected, the disk cache provides a faster access mechanism than object retrieval from the database. You can configure this in the noapp.properties file. |
A soft cache is an in-memory cache. The difference between a soft cache and a traditional cache is that the memory used to cache the objects is reclaimed as soon as memory becomes constrained. When the system is low on memory, the cached objects are automatically removed from memory. This is possible because the objects themselves are backed by persistent data in the database or disk and can be reread from there.
This behavior is similar to an operating system disk cache. The disk cache retains recently read files or sections of files in memory in order to speed up subsequent access to that data. However, if the system requires memory for applications to run, the cache size is reduced proportionally. You can see this in Windows by watching the size of the disk cache fall when you open a large file.
Sterling B2B Integrator follows this practice with soft caches. Most soft caches in Sterling B2B Integrator are implemented by Java™ Soft References.
Based on the amount of memory allocated to Sterling B2B Integrator and the number of CPUs, the Sterling B2B Integrator tuning wizard will allocate disk cache and in-memory cache. In-memory cache is a combination of the soft reference cache and memory cache displayed on the cache usage screen.