Skip to content

Instantly share code, notes, and snippets.

@marcpalmer
Created February 20, 2012 11:47
Show Gist options
  • Save marcpalmer/1868903 to your computer and use it in GitHub Desktop.
Save marcpalmer/1868903 to your computer and use it in GitHub Desktop.
Cache Headers Plugin Example
class ContentController {
def show = {
cache shared:true, validFor: 3600 // 1hr on content
render(....)
}
def todaysNewItems = {
cache shared: true, validUntil: new Date()+1
render(....)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment