Question: Is there a way to set max memory capacity without associating cost to item size?

I want to set max memory capacity but I don’t want to use cost as the size.
Basically in my case, I want max cost to be the max number of items and each item has cost 1.

Is there some way to achieve that?

Set the cost to 1 when setting the item.

Hi mrjn,
If I set the cost to 1, then how can I limit the max amount of memory usage in this case?
Thanks

So you want to set the memory capacity but don’t want to tell ristretto how much memory is being used by each item. Yeah, that’s not possible.