Skip to content

Instantly share code, notes, and snippets.

@ElakkuvanR
Created October 16, 2021 09:31
Show Gist options
  • Select an option

  • Save ElakkuvanR/2634cbb95a8e8d974aae38fa97e8a152 to your computer and use it in GitHub Desktop.

Select an option

Save ElakkuvanR/2634cbb95a8e8d974aae38fa97e8a152 to your computer and use it in GitHub Desktop.
public static class ServiceCollectionExtension
{
public static void AddCachingServices(this IServiceCollection services)
{
services.AddSingleton<IDistributedCache, RedisCache>();
services.AddSingleton<ICachingProvider, DistributedCachingProvider>();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment