org.codehaus.groovy.grails.web.mapping
Class UrlCreatorCache

java.lang.Object
  extended by org.codehaus.groovy.grails.web.mapping.UrlCreatorCache

public class UrlCreatorCache
extends Object

Implements caching layer for UrlCreator The "weight" of the cache is the estimated number of characters all cache entries will consume in memory. The estimate is not accurate. It's just used as a hard limit for limiting the cache size. You can tune the maximum weight of the cache by setting "grails.urlcreator.cache.maxsize" in Config.groovy. The default value is 160000 .

Since:
1.3.5
Author:
Lari Hotari

Nested Class Summary
static class UrlCreatorCache.ReverseMappingKey
           
 
Constructor Summary
UrlCreatorCache(int maxSize)
           
 
Method Summary
 void clear()
           
 UrlCreatorCache.ReverseMappingKey createKey(String controller, String action, Map params)
           
 UrlCreator lookup(UrlCreatorCache.ReverseMappingKey key)
           
 UrlCreator putAndDecorate(UrlCreatorCache.ReverseMappingKey key, UrlCreator delegate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlCreatorCache

public UrlCreatorCache(int maxSize)
Method Detail

clear

public void clear()

createKey

public UrlCreatorCache.ReverseMappingKey createKey(String controller,
                                                   String action,
                                                   Map params)

lookup

public UrlCreator lookup(UrlCreatorCache.ReverseMappingKey key)

putAndDecorate

public UrlCreator putAndDecorate(UrlCreatorCache.ReverseMappingKey key,
                                 UrlCreator delegate)