title: Is there an example of .NET Framework 4.7.x (not core) showing how to a simple (key, value) cache stored in Oracle?
body: <p>We have a c# .NET 4.7.x WebAPI application which needs to cache (key, value) pairs in an Oracle Database.  It's not .net core and ASP.NET caching won't work for our application.  </p>
  
  <ul>
  <li>Objects in the cache need to live well beyond the lifespan of a single WebAPI call.</li>
  <li>Objects to be stored in the cache take significant time to initally compute and are unchanged once computed for at least 24 hours.</li>
  <li>It needs to live inside the WebAPI application and Oracle. It cannot be farmed out to another server process, Redis, etc.</li>
  </ul>
  
  <p>Examples on the web point to options which don't work for us:</p>
  
  <ul>
  <li>Memory based cache: Cache needs to persist between WebAPI calls</li>
  <li>.NET Core based: Not using .NET Core, can't take the many man-months to move to .NET core</li>
  <li>ASP.NET based caching: Our application is the back end of a web service and the data cached is mainipulated before being returend to a WebAPI caller.  Caching the http output of a WebAPI call won't work in this application </li>
  <li>Redis: We can't add another new server application to the system</li>
  <li>Third party solutions from GitHub or elsewhere: Highly unlikely one of the third party GitHub libraries will be approved by our IT architecture panel due to increased system risk</li>
  </ul>
  
  <p>Already seen:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/41684213/looking-for-a-very-simple-cache-example">Looking for a very simple Cache example</a></li>
  <li><a href="https://docs.microsoft.com/en-us/dotnet/framework/performance/caching-in-net-framework-applications" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/dotnet/framework/performance/caching-in-net-framework-applications</a></li>
  <li><a href="https://docs.microsoft.com/en-us/dotnet/api/system.runtime.caching?view=netframework-4.7.2" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/dotnet/api/system.runtime.caching?view=netframework-4.7.2</a></li>
  <li><a href="https://docs.microsoft.com/en-us/dotnet/framework/performance/caching-in-net-framework-applications" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/dotnet/framework/performance/caching-in-net-framework-applications</a></li>
  <li><a href="https://docs.microsoft.com/en-us/dotnet/api/system.runtime.caching.cacheitem?view=netframework-4.7.2" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/dotnet/api/system.runtime.caching.cacheitem?view=netframework-4.7.2</a></li>
  <li>And lots of ASP.NET output caching dead-ends</li>
  <li>.NET Core based articles lacking examples beyond the most basic happy path memory cache usage</li>
  </ul>