Grails Cached Resources Plugin
Groovy
Switch branches/tags
Nothing to show
Clone or download
#1 Compare This branch is 5 commits behind Grailsrocks:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
grails-app
src/groovy/org/grails/plugin/cachedresources/util
test/unit/org/grails/plugin/cacheresources
web-app/css
.gitignore
CachedResourcesGrailsPlugin.groovy
LICENSE.txt
README.txt
application.properties

README.txt

This plugin calculates SHA256 hashes of your static resources and renames them to include this hash.

It then sets long term caching headers on the resources when rendering them.

Builds on the "Resources" framework plugin 

Todos:

* Add "excludes" URIs via Config to prevent certain types and URIs being handled in this way - 
  e.g. sites with lots of photos or where a filename is important e.g. Catalogue-2010.pdf
  Allow closure to determine it at runtime. e.g.:

  cached.resources.excludes = [
	  '*.pdf',
	  'assets/',
	  { uri ->
	  	  return !uri.startsWith('catalogue')
	  }
  ]