Open edoparearyee opened 9 years ago
We could use redis. We could have a simple service that checks if there is a cached version in redis and whether it has expired or not, then return it or make a new request.
I would personally go with memcachd
Are we looking to just cache responses from services or cache our API responses?
We have yet to look at how caching will work properly but in principle each GET
REST response should come with an ETag
header - this is a cache key. If the object has not changed the service should return an empty 304 Not Modified
so you should dig into your local cache - else if the service returns a 200 OK
then you have got some new data and you should update your cache for next time.
I'd imagine caching would done individually on each end point based on how likely they are to change for both data we get from micro services and our own api end points.
How are we going to cache data for our API endpoints?