Hi
I'm looking fro in-memory key-value storage for object (not html pages or css or js) e.g list of cars
something like Redis that could be integrated easily to AEM as Cloud (not on premiss )
so i can access it within the server side code e.g getValue(string key)
any ideas ?
Thanks in advance
Nir
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @nirshani ,
In-memory cache is not supported by OOTB on the cloud. It's also not recommended.
I have seen implementation with Ehcache or guava in past, but it runs into some problems in the CM build due to some issues with dependencies.
If you choose to store it in JCR as content (JSON), please make sure they are synched on the publishers due to the nature of the AEM Cloud.
Depending upon how you are developing the solution, In general, you could cache those responses on Dispatcher/CDN and check from the backend as well.
Or, move the logic to the front end In which case you have the default caching feature of CDN/Dispatcher to use, and also control over the expiration.
Regards,
Nitesh
Thanks for the replay
let me re-phrase : suppose i'm consuming a service the returns list of available cars for particular date and location
i want to store this data cache for say an hour , so for the next client the will ask for same date and location i will not send the query again , just get it from cache. after one hour the result is expired
Redis is doing this exactly but i'm looking to AEM as Cloud solution
hope is is clear now
@nirshani Thank you for the details. I recommand you to use the jcr node structure for this functionality.
1. For the first API call, save the data to the jcr node structure.
2. set the expiry date and time and every time clear the data in the node
2. until the secound call, the data will be their and data will be retrived
Hi @nirshani ,
In-memory cache is not supported by OOTB on the cloud. It's also not recommended.
I have seen implementation with Ehcache or guava in past, but it runs into some problems in the CM build due to some issues with dependencies.
If you choose to store it in JCR as content (JSON), please make sure they are synched on the publishers due to the nature of the AEM Cloud.
Depending upon how you are developing the solution, In general, you could cache those responses on Dispatcher/CDN and check from the backend as well.
Or, move the logic to the front end In which case you have the default caching feature of CDN/Dispatcher to use, and also control over the expiration.
Regards,
Nitesh
Hi,
Please check ACS Commons HTTP Cache feature
https://adobe-consulting-services.github.io/acs-aem-commons/features/http-cache/index.html
Views
Likes
Replies
Views
Likes
Replies