I am trying to retrieve some posts from my MongoDB database but it was taking a lot of time to get posts to I implemented Redis caching in my API but now I am facing a problem that it's returning the same posts from the cache every time I hit the API How to get new and different posts from redis cache whenever I hit the API? Instagram uses Redis and they give me new and different posts every time I scroll so fast How to balance things in my case? What can be a better approach to solve this problem with the API? What can we the best cache key?
Comment for the Algo, but if I'm already commenting, might as well ask: Did you also test F# Lists vs Array?
Nope - haven't done Arrays yet but might if there's enough interest.
Started with lists cause IME that's more commonly used.
I am trying to retrieve some posts from my MongoDB database but it was taking a lot of time to get posts to I implemented Redis caching in my API but now I am facing a problem that it's returning the same posts from the cache every time I hit the API How to get new and different posts from redis cache whenever I hit the API? Instagram uses Redis and they give me new and different posts every time I scroll so fast How to balance things in my case?
What can be a better approach to solve this problem with the API?
What can we the best cache key?