trimToSize

open fun trimToSize(maxSize: Int)(source)

Remove the eldest entries until the total of remaining entries is at or below the requested size.

Parameters

maxSize

the maximum size of the cache before returning. May be -1 to evict even 0-sized elements.