Using EhCache for session.createCriteria(...).list()
- by James Smith
I'm benchmarking the performance gains from using a 2nd level cache in Hibernate (enabling EhCache), but it doesn't seem to improve performance. In fact, the time to perform the query slightly increases.
The query is:
session.createCriteria(MyEntity.class).list();
The entity is:
@Entity
@Cache(usage =…