In-Memory Cache is a robust, thread-safe caching library developed in Python, designed to enhance application performance by storing data in memory for quick access. This library supports various caching strategies, including LRU (Least Recently Used) and LFU (Least Frequently Used) eviction policies, ensuring efficient memory management. Additionally, it features TTL (Time-To-Live) expiration to automatically remove outdated entries, and a background process for cleaning up expired keys. The cache is optimized for safe concurrent access using locks, making it suitable for multi-threaded environments. Although similar in concept to Redis or Memcached, this project is tailored for educational purposes, providing a single-process caching solution that is easy to understand and implement. Whether you're looking to improve application speed or learn about caching mechanisms, this library offers a practical and insightful experience.
Built with