Add flag to disable timestamps cache; useful for optimizing environments with only natural ID queries

Description

I've enabled the Hibernate query cache. And I've discovered that by using Criteria queries of "natural ID"s solely, there is little reason to replicate the timestamp cache; especially when using clustering.

I added a property setting disables the timestamp cache entirely. What happens in cases where a non-"natural ID" query is made is that the query simply occurs without caching at all, so this works fine.

This is a patch, applied against Hibernate 3.3 branch which allows for timestamp caching to be disabled, i.e., by setting:

hibernate.cache.use_timestamps_cache=false

Environment

None

Assignee

Unassigned

Reporter

Elias Ross

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Major