CacheStorageWithGetSize (FreeMarker 2.3.35 API)
Description: declaration: package: freemarker.cache, interface: CacheStorageWithGetSize

Package 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

  Modifier and Type
  Method
  Description
  `int`
  `getSize()`
  Returns the current number of cache entries.

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

  `clear, get, put, remove`

- ## Method Details

  - ### 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.