--- id: django-cache-url version: "3.4.6" license: MIT license_treatment: permissive maintenance: aging --- # django-cache-url — Use Cache URLs in your Django application. License: permissive · Maintenance: aging · Downloads: 226.4K/mo ## What it is and what it does django-cache-url is a lightweight Django utility that reads cache configuration from a CACHE_URL environment variable and translates it into Django's native CACHES dictionary format. It follows the 12-factor app pattern, making cache backend selection environment-driven rather than code-driven—useful for deploying the same codebase across development, staging, and production with different cache backends. The package supports a wide range of cache backends including local memory, file-based, database, memcached variants, Redis (via django-redis), and uWSGI cache. It defaults to local memory cache if no CACHE_URL is set, making it safe to add to projects without immediate environment configuration. The library is intentionally minimal—it has no runtime dependencies and focuses solely on URL parsing and configuration translation. Use it for: - Deploying Django apps across multiple environments with different cache backends specified only via environment variables. - Migrating between cache backends without changing application code, only the CACHE_URL. - Supporting legacy projects already using django-cache-url or projects requiring multiple cache backend support with unified URL-based configuration. - Containerized or cloud-deployed Django applications where cache configuration must be externalized from code. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Configures Django cache backends from environment variables using the 12-factor app pattern, supporting multiple cache types (memcached, Redis, file, database, local memory) through a single CACHE_URL setting. Yes, if you need URL-based cache configuration for non-Redis backends or are maintaining a legacy project already using this library. For new Django 4.2+ projects using only Redis, use Django's native RedisCache backend instead. The package is stable, dependency-free, and has no known vulnerabilities, but maintenance is aging—expect no active development, only maintenance fixes. ## Install pip install django-cache-url uv add django-cache-url poetry add django-cache-url ## Installing django-cache-url Before you install: Low install friction with no runtime dependencies. Maintenance status is aging—last release was 202 days ago—but the package is stable and the repository remains active. Suitable for established projects; new Redis-only projects should consider Django's native Redis support. License in practice: MIT license (permissive) allows commercial and private use with minimal restrictions, making it safe for most Django projects. Quickstart: pip install django-cache-url # In settings.py import django_cache_url CACHES = {'default': django_cache_url.config()} # Or parse a specific URL CACHES = {'default': django_cache_url.parse('memcached://HOST:PORT')} Verify before relying: - Whether the package actively maintains compatibility with Django 6.0 or if that classifier reflects aspirational support only. - Performance characteristics when parsing complex multi-instance cache URLs at application startup. - Specific port numbers and host configurations for different cache backends in production environments. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: aging - Downloads: 226.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django cache url configuration, environment variable cache setup, 12factor django caching, memcached redis configuration, django cache backend parser, configuration-management, twelve-factor [View on SkillFed](https://skillfed.io/packages/django-cache-url) · [View on PyPI](https://pypi.org/project/django-cache-url/)