0

Good afternoon. I need your help, please tell me whether it is possible when retrieving data from third-party services to sort them and keep an array sorted in the cache. If so, how do interactions with cache

1 Answer 1

1

take a look at the CacheStore section of this page http://guides.rubyonrails.org/caching_with_rails.html#cache-stores. It doesn't matter where you retrieve the data, just assign a cache key to the data you wanna to cache, and before each fetching, do a check to see whether that key is exists, if it doesn't do the actual fetching, otherwise get it back from the cache.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.