[
https://issues.apache.org/jira/browse/OFBIZ-10579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16673735#comment-16673735 ]
Mathieu Lirzin commented on OFBIZ-10579:
----------------------------------------
Hello Suraj,
I have started to review [^OFBIZ-10579.patch] and I think the following snippet of code is somewhat buggy because the date filter detection has no impact on the execution of {{entityListCache#put}} method:
{code:java}
public List<GenericValue> put(String entityName, EntityCondition condition, List<String> orderBy, List<GenericValue> entities) {
EntityDateFilterDetector dateFilterDetector = new EntityDateFilterDetector(condition);
if (dateFilterDetector.detect()) {
Debug.logWarning("Date filter detected in query condition, ignoring request to cache", module);
}
return entityListCache.put(entityName, condition, orderBy, entities);
}
public <T> T put(String entityName, EntityCondition condition, String name, T value) {
EntityDateFilterDetector dateFilterDetector = new EntityDateFilterDetector(condition);
if (dateFilterDetector.detect()) {
Debug.logWarning("Date filter detected in query condition, ignoring request to cache", module);
}
return UtilGenerics.<T>cast(entityObjectCache.put(entityName, condition, name, value));
}
{code}
Am I overlooking something?
Thanks
> Date filtered queries with caching should be restricted to cache
> ----------------------------------------------------------------
>
> Key: OFBIZ-10579
> URL:
https://issues.apache.org/jira/browse/OFBIZ-10579> Project: OFBiz
> Issue Type: Improvement
> Components: ALL APPLICATIONS
> Affects Versions: Upcoming Branch
> Reporter: Suraj Khurana
> Assignee: Suraj Khurana
> Priority: Major
> Attachments: OFBIZ-10579.patch, OFBIZ-10579.patch
>
>
> As per discussion on Dev MLÂ
>
https://markmail.org/thread/3qnkihmsyhly3lsg--
This message was sent by Atlassian JIRA
(v7.6.3#76005)