Ehcache.put
RegisteredEventListeners.notifyElementPut
cache.update(key, value)
QueryLoader.list // queryTranslator.getQuerySpaces()
factory.getSettings().isQueryCacheEnabled() && queryParameters.isCacheable()
listUsingQueryCache
QueryKey.generateQueryKey sql,parameter,firstRow,maxRow etc
getResultFromQueryCache
StandardQueryCache.get // !isUpToDate(spaces, timestamp)
doList
// session.get also calls the method, the query key is class#id
DefaultLoadEventListener.doLoad
loadFromSessionCache
loadFromSecondLevelCache
loadFromDatasource // call EntityLoader.load
putResultInQueryCache
StandardQueryCache.put // id list
listIgnoreQueryCache
TwoPhaseLoad.initializeEntity // EntityLoader.load also calls it
EntityAccessStrategyAdapter.putFromLoad // entity
SessionImpl.afterTransactionCompletion
// exec includes EntityInsertAction, Delete ... CollectionRemoveAction ...
// update timestamp
session.getFactory().getUpdateTimestampsCache().invalidate(exec.getPropertySpaces());
key: querySpace, propertySpace
本文详细介绍了Ehcache的缓存流程,包括元素的放入、查询加载、二级缓存使用及更新等核心环节,并深入探讨了如何利用查询缓存来提高数据检索效率。
1636

被折叠的 条评论
为什么被折叠?



