You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Rishi Agr <ri...@gmail.com> on 2022/07/08 06:30:42 UTC

Caching does not work if offset and limit are used in a query

Hi, I have created a view and the query on it has the pagination
implementation. The search on this view returns more than one page of data
and I would like to cache this. I've observed that the cache does not work
as expected if I have the offset and limit in the query. Also, if I change
the page size the previous selected size is not overridden. Let me know if
I need to add some other stuff in the query to make it work. Thank you.

Re: Caching does not work if offset and limit are used in a query

Posted by Nicolas Malin <ni...@nereide.fr>.
Hello Rishi,

Check with an EntityListIterator instead of a List, like it already done
with performFind service and Form list.

You extract from the data base only the segment needed through a
database pointer.

Nicolas

On 08/07/2022 08:30, Rishi Agr wrote:
> Hi, I have created a view and the query on it has the pagination
> implementation. The search on this view returns more than one page of data
> and I would like to cache this. I've observed that the cache does not work
> as expected if I have the offset and limit in the query. Also, if I change
> the page size the previous selected size is not overridden. Let me know if
> I need to add some other stuff in the query to make it work. Thank you.
>