khepri icon indicating copy to clipboard operation
khepri copied to clipboard

Implement memory management for the standalone functions cache

Open dumbbell opened this issue 3 years ago • 3 comments

In #72, we introduce a cache for already extracted standalone functions to improve performances.

Currently, this cache will grow indefinitely. We need some kind of policy to clean it up.

dumbbell avatar Apr 01 '22 08:04 dumbbell

What would you think about an ETS-based LRU cache for this? Would you be open to a contribution?

the-mikedavis avatar Apr 01 '22 13:04 the-mikedavis

In other RabbitMQ projects where we have a cache, it is sometimes an interface that you can implement however you like and configure a module to be used. Maybe it's an overkill for Khepri but there is no single best way to do K/V caching in process, so an interface makes certain sense to me. Our first implementation can be ETS-based :)

michaelklishin avatar Apr 01 '22 20:04 michaelklishin

What would you think about an ETS-based LRU cache for this? Would you be open to a contribution?

Yes, feel free to experiment!

dumbbell avatar Apr 05 '22 09:04 dumbbell