Microsoft Orleans: Grain Caches
Holy moly it’s been a while. Time for some more Orleans goodness, hopefully? Caches!
Overview
What are caches and what do they do? As usual, going to lean on Wikipedia to help me out:
From https://en.wikipedia.org/wiki/Cache_(computing):
In computing, a cache is a hardware or software component that stores data so that future requests for that data can be served faster; the data stored in a cache might be the result of an earlier computation or a copy of data stored elsewhere.
So basically a means of getting data faster, sign me up!
Often, you’ll see multiple levels of caching on varying pieces of infrastructure, whether those pieces are all contained within a single piece of hardware (like a computer), or spread across multiple pieces of hardware (like a network). We have the need for speed, and caches gonna give it to ya… ideally!
Problems with caching
https://aws.amazon.com/builders-library/caching-challenges-and-strategies/ has a lot of good information, but just to name a few:
- Stale data
- Inconsistent data across caches
- In the case of local caches — memory and/or additional CPU pressure on a system that is…