In my web application (Spring 3.1, Hibernate 4), I am using Ehcache for Hibernate 2nd level cache and Spring @Cache. I would like to know, where to use Hibernate Cache and Spring Cache?
For Example, I have few domain classes (view in database) which I am using as lookup values on screen. I can cache them using Hibernate 2nd level cache as well as Spring @Cache.
So, in my service layer if I cache these domain objects using Spring @Cache, I would receive these objects without hitting persistence layer at all (hibernate HQL query), once cached. Is it right approach?