Redis Integration with AEM | Community
Skip to main content
September 6, 2022

Redis Integration with AEM

  • September 6, 2022
  • 2 replies
  • 2227 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

arunpatidar
Community Advisor
Community Advisor
September 6, 2022

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

Arun Patidar
September 8, 2022

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.

arunpatidar
Community Advisor
Community Advisor
September 8, 2022

Hi,

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

Arun Patidar
September 19, 2022

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.