Skip to content

First Release

Compare
Choose a tag to compare
@ori88c ori88c released this 04 Jan 23:47
· 1 commit to main since this release

Key Features ✨

  • FIFO Cache: Automatically evicts the oldest record (based on insertion time) when the cache reaches its capacity and a new record with a non-existing key is added, irrespective of the record’s popularity.
  • Fixed TTL: Ensures all cached records share the same Time-to-Live (TTL) duration, allowing for automatic eviction of stale entries.
  • Efficiency ⚙️: JavaScript's Map maintains the insertion order of keys, offering a reliable and often overlooked guarantee for iteration. This guarantee is leveraged in FIFOCache to eliminate the need for manually managing insertion order for eviction purposes.
  • Comprehensive Documentation 📚: The class is thoroughly documented, enabling IDEs to provide helpful tooltips that enhance the coding experience.
  • Tests 🧪: Fully covered by comprehensive unit tests.
  • TypeScript support.
  • No external runtime dependencies: Only development dependencies are used.
  • ES2020 Compatibility: The tsconfig target is set to ES2020, ensuring compatibility with ES2020 environments.