{"categories":[{"label":"Dynamic Content","url":"https://skillfed.io/packages/category/internet-www-http-dynamic-content"}],"enrichment":{"capability":"Caches FastAPI endpoint and function results with support for Redis, Memcached, DynamoDB, and in-memory backends, including HTTP cache header handling.","skillfed_tags":["caching","multi-backend","http-headers"],"use_cases":["Cache API responses with automatic expiration to reduce database queries and improve endpoint latency.","Store results of expensive computations across multiple application instances using a shared backend.","Serve cached responses with proper HTTP cache headers and conditional request support for browser caching.","Cache function results in memory for single-instance deployments or testing without external dependencies.","Implement custom cache keys based on request method, URL, and query parameters instead of function arguments."],"what_it_does":"fastapi-cache2 is a caching layer for FastAPI applications that transparently stores and retrieves endpoint and function results. It wraps your route handlers with a @cache decorator that automatically manages cache expiration, key generation, and backend storage. The package supports multiple backends\u2014Redis, Memcached, DynamoDB, and in-memory\u2014so you can choose the right storage for your deployment.\n\nThe decorator integrates with FastAPI's dependency injection to handle HTTP cache semantics: it can set ETag and Cache-Control headers, return 304 Not Modified responses for conditional requests, and track cache hits and misses. You can customize cache behavior per endpoint with parameters like expiration time, namespace, and key-building strategy, or implement custom coders to handle non-JSON data types like Pydantic models and dataclasses.","worth_installing":"Yes, with conditions. The package is straightforward to integrate and widely used, but its aging maintenance status (751 days since last release) means you should verify compatibility with your FastAPI and Python versions before adopting it. No known vulnerabilities. Choose this if you need transparent endpoint caching with multiple backend options; avoid if you require active maintenance or cutting-edge feature updates."},"id":"fastapi-cache2","links":{"html":"https://skillfed.io/packages/fastapi-cache2","md":"https://skillfed.io/packages/fastapi-cache2.md","pypi":"https://pypi.org/project/fastapi-cache2/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2024-07-24","license_spdx":null,"license_treatment":"permissive","name":"fastapi-cache2","python_support":"supports_current","summary":"Cache for FastAPI"},"popularity":{"monthly_downloads":1050069,"position":4443,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.2.2"}
