Skip to content

Instantly share code, notes, and snippets.

@contensis
Created April 4, 2014 09:41
Show Gist options
  • Save contensis/9971338 to your computer and use it in GitHub Desktop.
Save contensis/9971338 to your computer and use it in GitHub Desktop.
Custom Cache
' This example will hardcode a cache on every oage that uses a particular template
Response.Cache.SetCacheability(Web.HttpCacheability.Public)
Response.Cache.SetExpires(Now.AddSeconds(60))
Response.Cache.SetValidUntilExpires(True)
'We want all Querystring parameters to be cached individually.
Response.Cache.VaryByParams("*") = True
Response.Cache.SetVaryByCustom("browser")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment