{"categories":[{"label":"WWW/HTTP","url":"https://skillfed.io/packages/category/internet-www-http/5"}],"enrichment":{"capability":"A decorator that caches function results using Django's cache framework, with support for cache invalidation, custom argument rewriting, and hit/miss callbacks.","skillfed_tags":["django-caching","performance-optimization","decorator-pattern"],"use_cases":["Cache expensive database queries in Django views to reduce load across repeated requests","Memoize complex calculations in utility functions with automatic timeout-based invalidation","Instrument cache performance by tracking hits and misses via callbacks for monitoring","Prevent duplicate API calls or background jobs by using store_result=False as a guard","Cache function results across multiple Django cache backends by specifying cache_alias"],"what_it_does":"django-cache-memoize is a lightweight decorator that wraps function calls and caches their results using Django's cache framework. It automatically generates cache keys from function arguments and keyword arguments, respecting a configurable timeout. The decorator works with Django's pluggable cache backends and handles pickling constraints transparently.\n\nThe package is designed for Django views and utility functions where repeated calls with the same arguments should return cached results. It offers advanced features like custom argument rewriting for complex objects, cache hit/miss callbacks for instrumentation, exception caching, and a guard mode that prevents repeated execution without storing results. The result must be pickleable to work with Django's cache framework.","worth_installing":"Yes, if you use Django and need simple function-level caching. The package is stable, actively maintained, has no external dependencies, and integrates cleanly with Django's cache framework. The MPL-2.0 copyleft license requires source disclosure if you modify and redistribute, but poses no restriction for typical use as a library dependency."},"id":"django-cache-memoize","links":{"html":"https://skillfed.io/packages/django-cache-memoize","md":"https://skillfed.io/packages/django-cache-memoize.md","pypi":"https://pypi.org/project/django-cache-memoize/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2024-12-18","license_spdx":null,"license_treatment":"copyleft","name":"django-cache-memoize","python_support":"supports_current","summary":"Django utility for a memoization decorator that uses the Django cache framework."},"popularity":{"monthly_downloads":248224,"position":8671,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.2.1"}
