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.
https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/content-delivery/caching.html
Regards,
Nitesh