Package: org.grails.web.mapping

## [Java] Class UrlCreatorCache

- org.grails.web.mapping.UrlCreatorCache

-     @java.lang.SuppressWarnings({ "unchecked", "rawtypes" })
      public class UrlCreatorCache
      extends java.lang.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 .

  Authors:
    Lari Hotari
  Since:
    1.3.5

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `private class` | `UrlCreatorCache.CachingUrlCreator` |
    `private enum` | `UrlCreatorCache.CachingUrlCreatorWeigher` |
    `static class` | `UrlCreatorCache.ReverseMappingKey` |
    `private static class` | `UrlCreatorCache.UrlCreatorKey` |

  - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private com.github.benmanes.caffeine.cache.Cache<ReverseMappingKey, CachingUrlCreator>` | `cacheMap` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `UrlCreatorCache (int maxSize)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `clear()`
    `` | `public UrlCreatorCache.ReverseMappingKey` | `createKey(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.lang.String httpMethod, java.util.Map params)`
    `` | `public UrlCreator` | `lookup(UrlCreatorCache.ReverseMappingKey key)`
    `` | `public UrlCreator` | `putAndDecorate(UrlCreatorCache.ReverseMappingKey key, UrlCreator delegate)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Field Detail

    - #### private final com.github.benmanes.caffeine.cache.Cache<ReverseMappingKey, CachingUrlCreator> cacheMap

  - ### Constructor Detail

    - #### public UrlCreatorCache(int maxSize)

  - ### Method Detail

    - #### public void clear()

    - #### public UrlCreatorCache.ReverseMappingKey createKey(java.lang.String controller, java.lang.String action, java.lang.String namespace, java.lang.String pluginName, java.lang.String httpMethod, java.util.Map params)

    - #### public UrlCreator lookup(UrlCreatorCache.ReverseMappingKey key)

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