Created
February 20, 2012 11:47
-
-
Save marcpalmer/1868903 to your computer and use it in GitHub Desktop.
Cache Headers Plugin Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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