builder.Services.AddControllers(options =>{ options.CacheProfiles.Add("Cache60Mins", new CacheProfile() { Duration = 60 * 60, // minutes * seconds Location = ResponseCacheLocation.Any });});
[ResponseCache(CacheProfile = "Cache60Mins")]//method