title: Is Redis a viable solution for a local cache?
body: <p>In my scenario, I have a Winforms client that connects to WebApi2. The data is stored in a SQL Server database.</p>
  
  <p>To speed up performance, I am researching if storing data in local cache is a viable solution. Preferably, the local cache should be stored in files instead of kept in-memory as RAM might be an issue. The data is all POCO classes, some being much more complex than others, and most classes being related to each other.</p>
  
  <p>I have made a shortlist of which frameworks might be viable:</p>
  
  <ol>
  <li>MemoryCache</li>
  <li>MemCached</li>
  <li>CacheManager</li>
  <li>StackExchange.Redis</li>
  <li>Local Database</li>
  </ol>
  
  <p>Using <code>MemoryCache</code>, I would need to implement my own solution, but it will fit my initial requirements. </p>
  
  <p>However, one common problem that I am seeing is the updating of related classes. For example, I have a relationship between <code>CustomerAddress</code> and <code>PostCode</code>. If I change some properties in a postcode object, I can easily update its local cache. But how is it possible to update/invalidate any other classes that use this postcode, in this case <code>CustomerAddress</code>?</p>
  
  <p>Does any of the frameworks above have methods that help in this kind of situation, or is it totally dependent on the developer to handle such cache invalidation?</p>