Skip to content

Commit

Permalink
cache size limit
Browse files Browse the repository at this point in the history
  • Loading branch information
nishanc committed Mar 26, 2022
1 parent 80585a1 commit f11f48d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion InMemoryCaching.API/Program.cs
Expand Up @@ -4,7 +4,11 @@

// Add services to the container.
// Add memory cache dependencies
builder.Services.AddMemoryCache();
builder.Services.AddMemoryCache(options =>
{
// Overall 1024 size (no unit)
options.SizeLimit = 1024;
});
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
Expand Down

0 comments on commit f11f48d

Please sign in to comment.