Because we want to read scores very quickly (pseudo-live viewing) we intend for user clients to poll our server and refetch the score history. If there are lots of clients spectating a game, we could be receiving a spike on our server/db reads. To make this as fast as possible without pub-sub architecture, we want users to be able to easily access the values from a cache.
Write the score history into our cache (rewrite value upon new score match writes; that's our condition to invalidating the cache) and our ensure that our client supports this new architecture (cache miss still goes to server)
Because we want to read scores very quickly (pseudo-live viewing) we intend for user clients to poll our server and refetch the score history. If there are lots of clients spectating a game, we could be receiving a spike on our server/db reads. To make this as fast as possible without pub-sub architecture, we want users to be able to easily access the values from a cache.
Write the score history into our cache (rewrite value upon new score match writes; that's our condition to invalidating the cache) and our ensure that our client supports this new architecture (cache miss still goes to server)