Skip to content

Instantly share code, notes, and snippets.

@moskinson
Created August 22, 2014 13:36
Show Gist options
  • Select an option

  • Save moskinson/c438b5a351c88a4b74ef to your computer and use it in GitHub Desktop.

Select an option

Save moskinson/c438b5a351c88a4b74ef to your computer and use it in GitHub Desktop.
cache headers time for Cache-headers Grails plugin
def SECONDS_IN_A_MINUTE = 60
def ONE_HOUR_IN_SECONDS = 60 * SECONDS_IN_A_MINUTE
def ONE_DAY_IN_SECONDS = 24 * ONE_HOUR_IN_SECONDS
def ONE_MONTH_IN_SECONDS = 30 * ONE_DAY_IN_SECONDS
def THREE_MONTHS_IN_SECONDS = 3 * ONE_MONTH_IN_SECONDS
cache.headers.presets = [
content: [validFor: ONE_MONTH_IN_SECONDS]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment