diff --git a/CacheHeadersGrailsPlugin.groovy b/CacheHeadersGrailsPlugin.groovy index bb7a1f6..9d83d4b 100644 --- a/CacheHeadersGrailsPlugin.groovy +++ b/CacheHeadersGrailsPlugin.groovy @@ -1,22 +1,26 @@ -import org.codehaus.groovy.grails.commons.ConfigurationHolder import groovy.util.ConfigObject class CacheHeadersGrailsPlugin { - def version = "1.1.5" + def version = "1.1.6" def grailsVersion = "1.2.0 > *" - def dependsOn = ['controllers':'1.1 > *', 'logging':'1.1 > *'] + def dependsOn = ['controllers':'1.1 > *'] def pluginExcludes = [ "grails-app/views/error.gsp", "grails-app/controllers/**" ] - def author = "Marc Palmer" - def authorEmail = "marc@grailsrocks.com" + def author = "Graeme Rocher" + def authorEmail = "grocher@gopivotal.com" def title = "Caching Headers Plugin" def description = '''\\ Improve your application performance with browser caching, with easy ways to set caching headers in controller responses ''' + def developers = [ [ name: "Marc Palmer", email: "marc@grailsrocks.com" ], [ name: "Graeme Rocher", email: "grocher@gopivotal.com" ]] + def issueManagement = [ system: "JIRA", url: "http://jira.grails.org/browse/GPCACHEHEADERS" ] + def scm = [ url: "http://github.com/grails-plugins/grails-cache-headers" ] + def license = "APACHE" + def observe = ['controllers'] // URL to the plugin's documentation @@ -32,8 +36,8 @@ Improve your application performance with browser caching, with easy ways to set addCacheMethods(application, log) } - void reloadConfig(svc, log) { - def conf = ConfigurationHolder.config.cache.headers + void reloadConfig(application, svc, log) { + def conf = application.config.cache.headers def cacheSetting = conf.enabled svc.enabled = ((cacheSetting instanceof String) || (cacheSetting instanceof Boolean)) ? Boolean.valueOf(cacheSetting.toString()) : true svc.presets = conf.presets @@ -67,7 +71,7 @@ Improve your application performance with browser caching, with easy ways to set def doWithApplicationContext = { applicationContext -> def svc = applicationContext.cacheHeadersService - reloadConfig(svc, log) + reloadConfig(application, svc, log) } def onChange = { event -> @@ -77,6 +81,6 @@ Improve your application performance with browser caching, with easy ways to set def onConfigChange = { event -> // Config change might mean that the caching has been turned on/off def svc = event.application.mainContext.cacheHeadersService - reloadConfig(svc, log) + reloadConfig(event.application, svc, log) } } diff --git a/README.md b/README.md new file mode 100644 index 0000000..7b82a9c --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +Grails Cache Headers Plugin +==================== + + +his plugin helps you Improve your application performance with browser caching, with easy ways to set caching headers in controller responses, and elegant ways to deal with ETag and Last-Modified generation and checking. +You can use this plugin to prevent caching of pages (eg forms), specify long term caching on infrequently changing content, and pass information to caching servers between the client and your app, and also to avoid regeneration of content if it has not changed since the client last downloaded it (even though the client may have an indication it has expired). + +See [the documentation](http://grails.org/plugin/cache-headers) for more information diff --git a/application.properties b/application.properties index 2781b17..a6ab1cc 100644 --- a/application.properties +++ b/application.properties @@ -1,6 +1,4 @@ #Grails Metadata file #Thu Apr 21 12:23:02 BST 2011 -app.grails.version=1.3.7 +app.grails.version=2.2.2 app.name=CacheHeaders -plugins.hibernate=1.3.7 -plugins.tomcat=1.3.7