Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Redis Integration with AEM

Avatar

Level 4

Hi,

 

Currently, we are calling the external service API and receiving the response in order to display the data. Assume we are calling the external services at 40 RPM. Because it is such a large number, we want to reduce the number of external calls as much as possible.

 

Previously, we used the Ehcache technique, which interfered with the internal AEM cache and occasionally corrupted the server. So we implemented a cache technique that is essentially a HashMap with the QueryParams as the key and the response as the value.

 

So we want to try Redis to cache the response. I found one YouTube link as a reference. Did anyone tried the Redis before or any other caching techniques implemented. 

 

https://www.youtube.com/watch?v=R9b38PXjBzQ&ab_channel=TechTalkwithRitesh.

1 Accepted Solution

Avatar

Community Advisor

Hi,

you need to write your own logic to store content in var wherever you receive the response or refresh it whenever is needed.

4 Replies

Avatar

Community Advisor

Hi,

You can try this if you are looking for memory cache

https://adobe-consulting-services.github.io/acs-aem-commons/features/http-cache/index.html

or use /var/yourproj/feature/cache to cache the response

Avatar

Level 4

Hi @arunpatidar,

 

Thank you for sharing your thoughts, I have went to the above reference link. It was hugely helpful.

How can we cache the response in the /var/yourproj/feature/cache folder? If you could please provide a link, that would be greatly appreciated.

Avatar

Community Advisor

Hi,

you need to write your own logic to store content in var wherever you receive the response or refresh it whenever is needed.

Avatar

Level 4

Hi,

I used the same approach as described in the link below to implement. For me, it works.

https://www.youtube.com/watch?v=R9b38PXjBzQ&ab_channel=TechTalkwithRitesh.