CachingLinkGenerator (Grails 3.2.4)
Date: 2016-12-21

Package: org.grails.web.mapping

## [Java] Class CachingLinkGenerator

- org.grails.web.mapping.CachingLinkGenerator

- A link generator that uses a LRU cache to cache generated links.

  Authors:
    Graeme Rocher
  Since:
    2.0

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static java.lang.String` | `EMPTY_MAP_STRING` |
    `static java.lang.String` | `LINK_PREFIX` |
    `static java.lang.String` | `RESOURCE_PREFIX` |
    `static java.lang.String` | `USED_ATTRIBUTES_SUFFIX` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `CachingLinkGenerator (java.lang.String serverBaseURL, java.lang.String contextPath)`
    `CachingLinkGenerator (java.lang.String serverBaseURL)`
    `CachingLinkGenerator (java.lang.String serverBaseURL, java.util.Map<java.lang.String, java.lang.Object> linkCache)`
    `CachingLinkGenerator (java.lang.String serverBaseURL, java.lang.String contextPath, java.util.Map<java.lang.String, java.lang.Object> linkCache)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `clearCache()`
    `protected java.lang.String` | `getCacheKeyValueForResource(java.lang.Object o)`
    `java.lang.String` | `link(java.util.Map attrs, java.lang.String encoding)`
    `protected java.lang.String` | `makeKey(java.lang.String prefix, java.util.Map attrs)`
    `java.lang.String` | `resource(java.util.Map attrs)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class DefaultLinkGenerator` | `getContextPath, getResourceId, getServerBaseURL, initializeResourcePath, isAbsolute, link, makeServerURL, resource, setPluginManager`
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), 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

    - #### public static final java.lang.String EMPTY_MAP_STRING

    - #### public static final java.lang.String LINK_PREFIX

    - #### public static final java.lang.String RESOURCE_PREFIX

    - #### public static final java.lang.String USED_ATTRIBUTES_SUFFIX

  - ### Constructor Detail

    - #### public CachingLinkGenerator(java.lang.String serverBaseURL, java.lang.String contextPath)

    - #### public CachingLinkGenerator(java.lang.String serverBaseURL)

    - #### public CachingLinkGenerator(java.lang.String serverBaseURL, java.util.Map<java.lang.String, java.lang.Object> linkCache)

    - #### public CachingLinkGenerator(java.lang.String serverBaseURL, java.lang.String contextPath, java.util.Map<java.lang.String, java.lang.Object> linkCache)

  - ### Method Detail

    - #### public void clearCache()

    - #### protected java.lang.String getCacheKeyValueForResource(java.lang.Object o)

    - #### @java.lang.Override public java.lang.String link(java.util.Map attrs, java.lang.String encoding)

    - #### protected java.lang.String makeKey(java.lang.String prefix, java.util.Map attrs)

    - #### @java.lang.Override public java.lang.String resource(java.util.Map attrs)