[jira] [Commented] (OFBIZ-10579) Date filtered queries with caching should be restricted to cache

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-10579) Date filtered queries with caching should be restricted to cache

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-10579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16625396#comment-16625396 ]

Suraj Khurana commented on OFBIZ-10579:
---------------------------------------

Thanks [~lektran] for the patch, I have done some slight modifications (majorly in _EntityQuery_) in it as required.

This patch introduces a new class _EntityDateFilterDetector._ It is used to check if condition object is instance of _EntityDateFilterCondition_ or an _EntityExpr_ where the left hand side (e.g. fieldName) contains "fromDate" (case insensitive). It will log warning ("Date filter detected in query condition, ignoring request to cache") instead of caching with date condition.

This also improves performance as now after this patch, filtered records are fetched from DB, instead of fetching records first and then using filterByCondition (dateCondition) on them.

> 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
>
>
> As per discussion on Dev ML 
> https://markmail.org/thread/3qnkihmsyhly3lsg



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)