This is a simple ASP.NET Core API being used to test using Cosmos as a distributed cache. Packages and resources being used include:
To run the API locally, you'll need to install the Cosmos DB emulator, which you can get here.
Alternatively - set up a real Cosmos DB instance and update appsettings.Development.json accordingly 😎
There are two endpoints available:
- /api/posts
- /api/posts/{id:int}
Initial requests will call out to an external endpoint for data and there responses will be cached. Subsequent requests will be retrieved from cache, which expires after 1 minute.