mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
WIP update/refactoring on caching
This commit is contained in:
1 parent
2dccb818a2
commit
4c4e084e43
25 files changed
+728
-460
No files matched your search
@@ -156,7 +156,7 @@ public class DLoadBeanContext extends DLoadBaseContext implements LoadBeanContex
|
||||
return;
|
||||
}
|
||||
|
||||
if (context.hitCache && context.desc.loadFromCache(ebi)) {
|
||||
if (context.hitCache && context.desc.cacheBeanLoad(ebi)) {
|
||||
// successfully hit the L2 cache so don't invoke DB lazy loading
|
||||
list.remove(ebi);
|
||||
return;
|
||||
@@ -167,7 +167,7 @@ public class DLoadBeanContext extends DLoadBaseContext implements LoadBeanContex
|
||||
Iterator<EntityBeanIntercept> iterator = list.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
EntityBeanIntercept bean = iterator.next();
|
||||
if (context.desc.loadFromCache(bean)) {
|
||||
if (context.desc.cacheBeanLoad(bean)) {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ public class DLoadManyContext extends DLoadBaseContext implements LoadManyContex
|
||||
EntityBean ownerBean = bc.getOwnerBean();
|
||||
BeanDescriptor<? extends Object> parentDesc = context.desc.getBeanDescriptor(ownerBean.getClass());
|
||||
Object parentId = parentDesc.getId(ownerBean);
|
||||
if (parentDesc.cacheLoadMany(context.property, bc, parentId, context.parent.isReadOnly())) {
|
||||
if (parentDesc.cacheManyPropLoad(context.property, bc, parentId, context.parent.isReadOnly())) {
|
||||
// we loaded the bean from cache
|
||||
list.remove(bc);
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user