CacheStorageWithGetSize (FreeMarker 2.3.23 API)
Date: 2015-07-05

freemarker.cache

## Interface CacheStorageWithGetSize

- All Superinterfaces:
    CacheStorage
  All Known Implementing Classes:
    MruCacheStorage, NullCacheStorage, SoftCacheStorage, StrongCacheStorage

      public interface CacheStorageWithGetSize
      extends CacheStorage

  A cache storage that has a `getSize()` method for returning the current number of cache entries.
  Since:
    2.3.21

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getSize()` Returns the current number of cache entries.

    - ### Methods inherited from interface freemarker.cache.CacheStorage

      `clear, get, put, remove`

- - ### Method Detail

    - #### getSize

          int getSize()

      Returns the current number of cache entries. This is intended to be used for monitoring. Note that depending on the implementation, the cost of this operation is not necessary trivial, although calling it a few times per minute should not be a problem.