SizeCalculator
A function for calculating the size of a cache entry represented by the provided key
* and value
.
For example, for String, you can use:
{ _, text -> text.length }
Content copied to clipboard
If the entries have the same size or their size can't be determined, you can just return 1.