3.11.1.5. Cache Extension
The provided data cache classes can be easily extended to add additional functionality.
If you are adding new behavior, you should extend org.apache.openjpa.datacache.ConcurrentDataCache.
To use your own storage mechanism, extend org.apache.openjpa.datacache.AbstractDataCache (preferred), or implement org.apache.openjpa.datacache.DataCache directly.
If you want to implement a distributed cache that uses an unsupported method for communications, create an implementation of org.apache.openjpa.event.RemoteCommitProvider.
This process is described in greater detail in Customization.
The query cache is just as easy to extend.
Add functionality by extending the default org.apache.openjpa.datacache.ConcurrentQueryCache.
Implement your own storage mechanism for query results by extending org.apache.openjpa.datacache.AbstractQueryCache (preferred) or implementing the org.apache.openjpa.datacache.QueryCache interface directly.