Iteration¶
You can iterate over all entries in the cache using the All method.
Key Features¶
Iteration in Otter provides:
- Efficiency: Iteration is performed efficiently without blocking other operations
- Goroutine Safety: Iteration is safe to use in concurrent environments
- Weak Consistency: Iteration reports every key that is present for the whole iteration once; changes made during the iteration may or may not be reported
- Memory Efficiency: Iteration is performed without copying the entire cache