您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

MyCacheOutputAttribute.cs 454B

123456789101112131415
  1. using System.IO;
  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) : base(seconds)
  9. {
  10. CacheOutputData = Path.Combine(Path.GetTempPath(), "cache-control-test");
  11. CacheType = OutputCacheType.File;
  12. }
  13. }
  14. }