Crate cache_cache

Source
Expand description

This caching library has been designed for specific use-cases where:

  • getting a “fresh” value can be time consuming and can fail (eg. IOs with hardware)
  • getting multiple values at once can be more efficient than getting each value independantly.

Typically, its primary use was to retrieve position/speed/temperature/etc from multiple motors using serial communication. In this setup, the motors are daisy chained, and in the protocol used to communicate with them, a specific message can be used to retrieve a register value for multiple motors at once.

Structs§

Cache
Cache implementation with a focus on expiry duration and reducing IO calls.
Entries
A view into multiple Entry in a cache.
OccupiedEntry
A view into an occupied entry in a Cache. It is part of the Entry enum.
VacantEntry
A view into a vacant entry in a Cache. It is part of the Entry enum.

Enums§

Entry
A view into a single entry in a cache, which may either be vacant or occupied.