{"categories":[{"label":"Application Frameworks","url":"https://skillfed.io/packages/category/software-development-libraries-application-frameworks/4"}],"enrichment":{"capability":"In-memory async cache for Python applications with TTL, LRU eviction, thundering herd protection, and DataLoader-style batching to reduce redundant work under concurrent load.","skillfed_tags":["asyncio","performance-optimization","microservices"],"use_cases":["Reduce database load in microservices by caching user profiles or configuration that multiple requests fetch concurrently.","Implement DataLoader-style batching to group 100 concurrent user ID lookups into a single batch database query.","Preload frequently-accessed data (hot keys) at application startup to avoid cold-start cache misses.","Monitor cache effectiveness with built-in metrics (hit rate, size) for Prometheus or other observability systems.","Decorate async functions to automatically cache results with TTL without rewriting function logic."],"what_it_does":"async-cache is an in-memory application-layer cache designed for async Python microservices and applications. It stores frequently-accessed data in memory with configurable TTL (time-to-live) and LRU eviction, reducing redundant database or API calls. The core API provides a flexible `AsyncCache` class that accepts loader functions to automatically fetch and cache missing values on demand.\n\nThe package addresses two common async scaling problems: thundering herd (where many concurrent requests for the same missing key trigger many identical backend calls) and inefficient batch loading (where individual requests could be grouped into one efficient batch query). It includes decorator convenience wrappers (`AsyncLRU`, `AsyncTTL`) for simpler function-level caching, cache warmup to preload hot keys at startup, and built-in metrics (hits, misses, hit rate) for observability and monitoring integration.","worth_installing":"Yes. The package has no runtime dependencies, installs with low friction, is actively maintained, carries no known vulnerabilities, and solves real concurrency problems (thundering herd, batch efficiency) that are difficult to handle correctly in async code. It is a solid choice for microservices and applications that need straightforward in-memory caching with async-aware deduplication."},"id":"async-cache","links":{"html":"https://skillfed.io/packages/async-cache","md":"https://skillfed.io/packages/async-cache.md","pypi":"https://pypi.org/project/async-cache/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-04-22","license_spdx":null,"license_treatment":"permissive","name":"async-cache","python_support":"supports_current","summary":"an asyncio application layer cache and dataloader for python based microservices and applications with thundering herd protection"},"popularity":{"monthly_downloads":218109,"position":9344,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.0.3"}
