Expand my Community achievements bar.

SOLVED

AEM 6: Caching REST Web Service call

Avatar

Level 4

Hi,

I am calling a REST Web Service to load the data from the back end. Is there any way I can cache the Web Service call since this is the service that loads maximum data.

thanks.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You can use angularjs caching module to cache REST responses.

Kindly mind this is purely client side caching, just to give you an idea,.. REST url becomes the key whereas response the object that you cache against it.

For more details checkout below URL: https://github.com/jmdobry/angular-cache

- Runal

View solution in original post

4 Replies

Avatar

Level 4
I am not sure how the RESTful Web Service has been written since there is an entirely different team for that. I have the end point URL for it that ends with .json

Avatar

Level 10

How did you implemented your Restful Web Service - did you write a AEM Java servlet? 

Avatar

Correct answer by
Community Advisor

You can use angularjs caching module to cache REST responses.

Kindly mind this is purely client side caching, just to give you an idea,.. REST url becomes the key whereas response the object that you cache against it.

For more details checkout below URL: https://github.com/jmdobry/angular-cache

- Runal

Avatar

Level 10

or you might have to use some memory cache for this