Data stored within a Cache resides in the Heap (main memory) of a Rhino cluster node. If the original data has changed, it is necessary to remove any cached copies so that the next time the data is read the new value is used.
A common scenario for cache invalidation is where a user’s data is stored in Transparent Data in the HSS, and cached for session processing. It is cached for session processing to speed up session processing and offload the HSS. The user then updates their data, and expects that the next session they participate in reflects their new settings (for example, anonymity or barring of outgoing international calls).
The Cache can be invalidated through a management API (called an invalidation API). This exists to be integrated into other systems such as:
an operator’s provisioning system
an XCAP server
The invalidation API is "cluster-wide". I.e. even though there can be many Rhino cluster members, any single member can receive the invocation and is then responsible for invalidating all copies of the cached data across the cluster.
Javadoc for this API is available in Sh Cache Management API.
All caches are dropped when:
a Rhino cluster restarts
the Invalidation Management API is invoked to invalidate all caches
Specific cache entries are invalidated when:
an invalidation operation is triggered on the management interface
on receiving a PNR message with empty service data
on receiving a cache invalidation message from another node
An Sh Cache RA can broadcast cache invalidation messages to other Rhino cluster members to trigger invalidation of specific cache entries.
These messages are sent when a Push Notification Request is received from the HSS, and the invalidation management API is invoked.
The invalidation messages can be turned on or off by DataReference when acting on PNR messages. See DataReference cache configuration for more information.