I have second level cache enabled in my app using:
Code:
<property name="hibernate.cache.use_second_level_cache" value="true"/>
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.OSCacheProvider"/>
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
I can see the effect of caching when I load entities by PK. When I do search, however, I find search results always loaded from db, because after I search once, and modify db records by hand, the next search always turns up the latest information. I thought hibernate search uses Lucene to find the id, and then loads it from db. If that is the case, the loading part should be from cache. Does it not?
Thanks.