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.

ValuesController.cs 867B

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System.Collections.Generic;
  2. using System.Web.Http;
  3. using iiie.CacheControl.Business.Attributes;
  4. using iiie.CacheControl.Business.OutputCache;
  5. namespace CacheControl_test.Controllers
  6. {
  7. public class ValuesController : ApiController
  8. {
  9. // GET api/values
  10. public IEnumerable<string> Get()
  11. {
  12. return new string[] { "value1", "value2" };
  13. }
  14. // GET api/values/5
  15. [TimeCacheControl(60, true, false, OutputCacheType.File)]
  16. public string Get(int id)
  17. {
  18. return "value";
  19. }
  20. // POST api/values
  21. public void Post([FromBody]string value)
  22. {
  23. }
  24. // PUT api/values/5
  25. public void Put(int id, [FromBody]string value)
  26. {
  27. }
  28. // DELETE api/values/5
  29. public void Delete(int id)
  30. {
  31. }
  32. }
  33. }