cfg.go 818 B

12345678910111213141516171819202122232425
  1. package cfg
  2. import "time"
  3. // The constants be used by both client and server
  4. var (
  5. FailStatus = 400
  6. SuccessStatus = 200
  7. ContentHTML = "text/html; charset=utf-8"
  8. ContentTypeHeader = "Content-Type"
  9. StatusCodeHeader = "Status"
  10. QueryCacheKey = "cache_key"
  11. QueryCacheDuration = "cache_duration"
  12. QueryCacheStatusCode = "cache_status_code"
  13. QueryCacheContentType = "cache_content_type"
  14. RequestCacheTimeout = 5 * time.Second
  15. )
  16. // NoCacheHeader is the static header key which is setted to the response when NoCache is called,
  17. // used inside nethttp and fhttp Skippers.
  18. var NoCacheHeader = "X-No-Cache"
  19. // MinimumCacheDuration is the minimum duration from time.Now
  20. // which is allowed between cache save and cache clear
  21. var MinimumCacheDuration = 2 * time.Second