Is there an example of .NET Framework 4.7.x (not core) showing how to a simple (key, value) cache stored in Oracle?

Viewed 1134

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.

  • Objects in the cache need to live well beyond the lifespan of a single WebAPI call.
  • Objects to be stored in the cache take significant time to initally compute and are unchanged once computed for at least 24 hours.
  • It needs to live inside the WebAPI application and Oracle. It cannot be farmed out to another server process, Redis, etc.

Examples on the web point to options which don't work for us:

  • Memory based cache: Cache needs to persist between WebAPI calls
  • .NET Core based: Not using .NET Core, can't take the many man-months to move to .NET core
  • 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
  • Redis: We can't add another new server application to the system
  • 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

Already seen:

0 Answers
Related