org.codehaus.groovy.grails.web.pages.discovery
Class CachingGroovyPageStaticResourceLocator

java.lang.Object
  extended by org.codehaus.groovy.grails.core.io.DefaultResourceLocator
      extended by org.codehaus.groovy.grails.web.pages.discovery.GroovyPageStaticResourceLocator
          extended by org.codehaus.groovy.grails.web.pages.discovery.CachingGroovyPageStaticResourceLocator
All Implemented Interfaces:
org.codehaus.groovy.grails.core.io.ResourceLocator, org.codehaus.groovy.grails.plugins.PluginManagerAware, org.springframework.beans.factory.Aware, org.springframework.context.ResourceLoaderAware

public class CachingGroovyPageStaticResourceLocator
extends GroovyPageStaticResourceLocator

Extends GroovyPageStaticResourceLocator adding caching of the result of GroovyPageStaticResourceLocator.findResourceForURI(String).

Since:
2.0

Field Summary
 
Fields inherited from class org.codehaus.groovy.grails.core.io.DefaultResourceLocator
classNameToResourceCache, classSearchDirectories, CLOSURE_MARKER, defaultResourceLoader, FILE_SEPARATOR, NULL_RESOURCE, patchMatchingResolver, pluginManager, resourceSearchDirectories, uriToResourceCache, warDeployed, WEB_APP_DIR, WILDCARD
 
Constructor Summary
CachingGroovyPageStaticResourceLocator()
           
 
Method Summary
 org.springframework.core.io.Resource findResourceForURI(java.lang.String uri)
           
 long getCacheTimeout()
           
 void setCacheTimeout(long cacheTimeout)
           
 
Methods inherited from class org.codehaus.groovy.grails.core.io.DefaultResourceLocator
findResourceForClassName, findResourceInBinaryPlugins, getDefaultResourceLoader, setPluginManager, setResourceLoader, setSearchLocation, setSearchLocations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingGroovyPageStaticResourceLocator

public CachingGroovyPageStaticResourceLocator()
Method Detail

findResourceForURI

public org.springframework.core.io.Resource findResourceForURI(java.lang.String uri)
Specified by:
findResourceForURI in interface org.codehaus.groovy.grails.core.io.ResourceLocator
Overrides:
findResourceForURI in class GroovyPageStaticResourceLocator

getCacheTimeout

public long getCacheTimeout()

setCacheTimeout

public void setCacheTimeout(long cacheTimeout)