Is it possible to configure Hibernate to write to the second level cache, but not the database? CacheMode doesn't really have a value that pertains to this, but I was also thinking of writing an interceptor to change the cache behavior.
Reason
We currently receive messages from another system in which we consume and put in the database with Hibernate. We use Coherence for the 2nd level cache. Some of our data that currently resides in the database doesn't technically need to be in the database since it is transitive, but we would like to continue using Hibernate as a common interface for managing the data. We could use Coherence directly, but would rather utilize SQL and the Hibernate layer instead of gets/puts of Coherence. In a sense, Hibernate and Coherence would look like an in memory DB.
|