liferay_vaibhav
liferay_vaibhav

Reputation: 11

how we will cache webservice response in spring?

In our project we planning to use Java spring framework web service client so just I want to know , What are best practices to implement the web service client in spring? What are performance points need consider while building such client? Can we cache web service response in spring ?

Upvotes: 1

Views: 3336

Answers (1)

Vinicius Carvalho
Vinicius Carvalho

Reputation: 4156

Considering you are aware of implications of caching results (aka having stale data)

your best alternative would be spring great cache abstraction, introduced on Spring 3.1

Spring Cache Abstraction

Have a look there, you can wrap your webservice client calls in a cache method and let spring deal with the caching part for you. Nicest part is that you have the freedom to choose your cache provider.

Upvotes: 1

Related Questions