Skip to content

Instantly share code, notes, and snippets.

@ealsur
Created June 24, 2021 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ealsur/fd242b9efdc2ad48f573c67a8268231e to your computer and use it in GitHub Desktop.
Save ealsur/fd242b9efdc2ad48f573c67a8268231e to your computer and use it in GitHub Desktop.
services.AddCosmosCache((CosmosCacheOptions cacheOptions) =>
{
cacheOptions.ContainerName = "myContainer";
cacheOptions.DatabaseName = "myDatabase";
cacheOptions.CosmosClient = preExistingClient;
/* Creates the container if it does not exist */
cacheOptions.CreateIfNotExists = true;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment