icacher 0.1.4

A minimal crate for caching functions
Documentation
  • Coverage
  • 100%
    22 out of 22 items documented4 out of 21 items with examples
  • Size
  • Source code size: 10.94 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.78 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • rohankid1/ICacher
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • rohankid1

ICacher

This crate provides 1 new type for caching functions and 1 trait for implementing your own caching struct. Although there are 2 more traits, those are deprecated and should not be used.

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.

This crate will probably receive regular updates from time to time. Updates may or may not have new features in order to keep this lightweight and simple.

GitHub | Crates.io