Theoretical max cache hit rate
Introducing our theoretical cache hit rate: a powerful tool to help understand the maximum achievable cache hit rate for a particular operation, factoring in all possible variable and scope combinations.
Consider an operation that has been requested 1,000 times within the past 24 hours. If there is only a single unique combination of variables and scopes for this operation, and we set a max-age of 24 hours, we would encounter a single cache miss. This leads to a remarkable 999 cache hits. Therefore, the theoretical maximum cache hit rate would be 99.9%, calculated as 999/1000.
A good example of such an operation might be a posts
query for a blog, which typically has consistent variables and scopes.
Contrast this with an operation with higher variable diversity, such as a search
query. For 1,000 requests, we might observe 800 unique variable combinations. In this scenario, Stellate will cache 800 requests upon their first encounter. This could result in up to 200 cache hits, yielding a theoretical maximum cache hit rate of 20%.
We are delighted to announce that this insightful feature is now readily available in the operations view for all services! Please explore its potential to optimize your caching strategies.