Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Caching of the query results or any other alternative?

Avatar

Former Community Member

Hi,

We are in the process of launching the website and it seems like the only issue left is page load times on certain pages when executed against publishers. We are using Varnish as our cache servers and seems to handle stuff quite well.

We have user related stuff all over the website and every page has got few ESI includes. Our caching strategy is simple: When a user logs in, we cache the webpage they visited in the their respective cached object for anonymous user there is only one cache. So, if you are visiting the same page and nothing has been change for the logged in user then we show the cached object value otherwise, if anything has changed for the user object then we rerun the queries and cache the results. The running of queries take a while under load.

If the cache of that page exists in varnish then the page is getting returned quite quickly. While if not, then queries are executed on the publisher and some pages have got a huge data sets and hence under load sometimes each query takes upto 3-7 seconds to return the results. We are executing Xpath queries as SQL2 was much slower for multiple paths and are on 5.6.1. In no or minimal load each query takes about 100 ms.

Is there a way we can cache the query results as the results will rarely change? Any other alternative we can do to get around this problem. 

The load we are testing is upto 1000 threads at any time frame.

Cheers and Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi samthadhani ,

AFAIK there is no caching of query result inbuilt.  If the query is like creating top 10 articles etc... then use navigational access to the content tree instead of performing a JCR Query.     Other alternatives i can think of movement is instead of waiting user request to fill the cache, prefill in advance.

Thanks,
Sham
Tweet @adobe_sham

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

Hi samthadhani ,

AFAIK there is no caching of query result inbuilt.  If the query is like creating top 10 articles etc... then use navigational access to the content tree instead of performing a JCR Query.     Other alternatives i can think of movement is instead of waiting user request to fill the cache, prefill in advance.

Thanks,
Sham
Tweet @adobe_sham