$npx skillfedfor your agent

django-cache-memoize

Django utility for a memoization decorator that uses the Django cache framework.

With conditionsPyPI WWW/HTTPReleased Dec 2024248.2K downloads / moMPL-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — django_cache_memoize-0.2.1-py3-none-any.whl
v0.2.1 · released 2024-12-18 · Python >=3.8

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.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Django to be installed and configured with a cache backend (e.g., memcached, Redis, or database cache).
  • Low friction install with no runtime dependencies.
  • Actively maintained with recent commits and a stable release history since 2017.

License · maintenance · safety

MPL-2.0 (copyleft) — Licensed under MPL-2.0, a copyleft license. You must disclose source code modifications and distribute under the same license if you modify and redistribute the package.

last release 2024-12-18 (604 days) · last repo commit 2026-08-01 · 169 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 248,224 downloads/mo, #8,671 on PyPI

Verify before relying

pip install django-cache-memoize

from django_cache_memoize import cache_memoize

@cache_memoize(100)
def expensive_function(start, end):
    return sum(range(start, end))

result = expensive_function(0, 1000)
  • Whether Django is an implicit peer dependency or if the decorator works outside Django projects
  • Performance overhead of the decorator relative to direct cache calls
  • Behavior when Django cache backend is not configured
Same gist for agents: .md · .json

What it is and 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.

The 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.

Use it for

  • 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

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

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.

Install

django-cache-memoize on PyPI

Before you install

Low friction install with no runtime dependencies. Actively maintained with recent commits and a stable release history since 2017.

Requires Django to be installed and configured with a cache backend (e.g., memcached, Redis, or database cache).

License in practice

Licensed under MPL-2.0, a copyleft license. You must disclose source code modifications and distribute under the same license if you modify and redistribute the package.

Quickstart

pip install django-cache-memoize

from django_cache_memoize import cache_memoize

@cache_memoize(100)
def expensive_function(start, end):
    return sum(range(start, end))

result = expensive_function(0, 1000)

Verify before relying

  • Whether Django is an implicit peer dependency or if the decorator works outside Django projects
  • Performance overhead of the decorator relative to direct cache calls
  • Behavior when Django cache backend is not configured

Package facts

LicenseMPL-2.0 copyleft
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 604 days since the last release
Last repo commit
First released
Downloads248,224 / month, #8,671 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: Web Environment :: MozillaFramework :: DjangoIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseLicense :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)Programming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTP

Evidence: django_cache_memoize-0.2.1-py3-none-any.whl

Tags

Capabilities
django function result cachingmemoization decorator djangocache decorator with timeoutdjango cache framework wrapperfunction call memoizationdjango performance optimizationcache invalidation decorator
Topics
django-cachingperformance-optimizationdecorator-pattern
PyPI keywords
djangomemoizecachedecorator

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “memoization decorator django”

  • django-cache-memoizeA decorator that caches function results using Django's cache…
  • django-memoizeCaches function and method results in Django applications using…
  • memoizationDecorator-based function result caching with configurable TTL,…

Give your agent the search over MCP, or paste the wish link into any chat.

More WWW/HTTP packages

urllib3 Worth it
PyPI · Libraries · released May 2026

urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.

MITpure Python · 3.10+
1.8Bdownloads / mo
requests Worth it
PyPI · Libraries · released May 2026

Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.

Apache-2.0pure Python · 3.10+
1.8Bdownloads / mo
h11 With conditions
PyPI · WWW/HTTP · released Apr 2025

h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.

MITpure Python · 3.8+aging
894.9Mdownloads / mo
httpx Worth it
PyPI · WWW/HTTP · released Dec 2024

HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.

Install it if you are building new projects or modernizing existing ones that rely on HTTP.

BSD-3-Clausepure Python · 3.8+
797.0Mdownloads / mo
httpcore With conditions
PyPI · WWW/HTTP · released Apr 2025

A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.

BSD-3-Clausepure Python · 3.8+aging
783.6Mdownloads / mo
aiohttp Worth it
PyPI · WWW/HTTP · released Jul 2026

aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.

Install it if you need async HTTP client or server capabilities in asyncio-based applications.

permissive licensecompiled wheel · 3.10+
643.6Mdownloads / mo

See also django-memoize · memoization · py-memoize · cached_method · asyncache · django-cacheops · cachetools-async · cachier · django-cachalot · propcache