Expand description


Running the same function (that return the same value) over and over again can be inefficient. This lightweight, dependency-free crate attempts to solve this problem by caching each return value. It will only, unless explicitly called to run multiple times or if the value isn’t cached, be called once.


The built-in, default, generic type for caching functions and storing its value in a HashMap.


This trait provides core functionality of a function cacher:


This trait is deprecated; however, the trait FnCacher remains as to allow basic, but minimalistic, guidance.


This trait, as well as FnCacherExt, is deprecated as extension traits did not provide any benefits; methods that were in the trait are now provided directly in the ICacher type.