You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MyCacheOutputAttribute.cs 568B

123456789101112131415
  1. using System.Configuration;
  2. using iiie.CacheControl.Business.Attributes;
  3. using iiie.CacheControl.Business.OutputCache;
  4. namespace CacheControl_test.Controllers
  5. {
  6. public class MyCacheOutputAttribute : TimeCacheControlAttribute
  7. {
  8. public MyCacheOutputAttribute(int seconds, bool excludeGet = false, bool excludePost = false) : base(seconds, excludeGet, excludePost)
  9. {
  10. CacheType = OutputCacheType.DataBase;
  11. OutputCacheData = ConfigurationManager.ConnectionStrings["ConnectionString42"].ConnectionString;
  12. }
  13. }
  14. }