hi all-
i'm developing the service behind a UI-driven application and opted to use Hibernate as the data access framework to take advantage of the benefits provided by the Criteria API. i essentially have a chain of classes dedicated to handling each possible user input field from the UI, and a DetachedCriteria instance is passed along that chain to be built up and finally executed within a new Session instance.
as of late i've noticed that a rather significant portion of the overall time spent processing a request can be directly attributed to loading/creating association object instances. since the the make-up of these objects is largely (if not totally) static i thought i would be able to enable the L2 caching and have Hibernate hydrate cached values for these objects rather than fetching and re-creating them several times over (even in the same request). however, i only see the objects being added to the cached - i don't actually see them being consumed from the cache.
i'm pretty green here - is what i'm trying to do even possible? any/all guidance would be greatly appreciated.
|