こんにちは、アプリケーションにアノテーション ベースの ehcache を実装しています。これをサービスレイヤーに実装していて、クエリに DetachedCriteria を使用していますが、ehcache が機能していません。誰でもこれについて何か考えがありますか? 私を助けるか、これを行うための他の方法を提案してください。前もって感謝します
ehcache.xml 内
<defaultCache eternal="true" maxElementsInMemory="100" overflowToDisk="false" />
<cache name="loadAll" maxElementsInMemory="1000" eternal="true" overflowToDisk="false" />
</ehcache>
私が使用しているサービス層で
@Cacheable(cacheName="loadAll")
List<ShiftDetail> loadAll(DetachedCriteria detachedCriteria);
そしてapplicationContext.xmlでは、ehcacheは次のようにマッピングされます
<ehcache:annotation-driven create-missing-caches="true" cache-manager="cacheManager" />
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" >
<property name="configLocation" value="/WEB-INF/ehcache.xml"/>
</bean>