|
I played around really quickly with using the source HQL as the cache key instead. Good and bad. The CacheKey becomes very sensitive to unimportant source variations. For example there were failures in the testsuite initially where we were testing the caching of the following queries:
-
from Animal a where a.age > ?
-
select a from Animal a where a.age > ?
So functionally they are the same query, but different in the source representation - here we get 2 different CacheKeys and thus a cache miss for the second execution.
I'll create a branch in my fork for everyone to be able to see and discuss in triage.
|