--- id: oslo-cache version: "4.3.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # oslo.cache — Cache storage for OpenStack projects. License: permissive · Maintenance: active · Downloads: 348.3K/mo ## What it is and what it does oslo.cache is an OpenStack library that abstracts caching operations by wrapping dogpile.cache, a mature memoization and key-value storage library. It provides a consistent interface for OpenStack projects to cache expensive computations and data without reimplementing caching logic, and supports multiple backends including Memcached. The library integrates with oslo.config for configuration management and oslo.log for logging, making it a natural fit for OpenStack services that need transparent caching across their codebase. The package is designed for teams building or extending OpenStack infrastructure. It handles the plumbing of cache initialization, decorator-based memoization, and backend selection, letting developers focus on identifying what to cache rather than managing cache mechanics. It requires Python 3.11 or later and depends on five oslo.* libraries plus dogpile.cache itself. Use it for: - Cache expensive database queries or API calls in OpenStack services to reduce latency and load. - Memoize computationally intensive operations (e.g., policy evaluation, token validation) across requests. - Share cached data across multiple OpenStack service instances via a Memcached backend. - Standardize caching patterns across an OpenStack deployment without per-service reimplementation. - Integrate caching into existing oslo.config-based OpenStack projects with minimal code changes. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. oslo.cache wraps dogpile.cache to provide a standardized caching layer for OpenStack projects, supporting memoization and key-value storage with pluggable backends like Memcached. Yes, if you are building or maintaining an OpenStack service. oslo.cache is actively maintained, has no known vulnerabilities, and low install friction. Its value is specific to the OpenStack ecosystem; outside that context, you would likely use dogpile.cache directly or a simpler caching library. ## Install pip install oslo-cache uv add oslo-cache poetry add oslo-cache ## Installing oslo.cache Before you install: Low friction install with five stable runtime dependencies. Actively maintained as of 35 days ago, supporting current Python versions (3.11–3.14). License in practice: Apache-2.0 permissive license allows use in most commercial and open-source contexts without significant restrictions. Quickstart: pip install oslo.cache from oslo_cache import cache cache.configure(CONF) decorator = cache.get_memoization_decorator(CONF, 'my_cache') @decorator def expensive_function(arg): return result Requires Python >= 3.11. Typically used within an OpenStack project context where oslo.config is already configured. Verify before relying: - Whether dogpile.cache backends (Memcached, Redis, etc.) require additional system libraries or configuration beyond what oslo.cache provides. - Performance characteristics and scalability limits for high-concurrency caching scenarios. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 348.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags openstack caching library, dogpile.cache wrapper, memcached integration, memoization framework, distributed cache abstraction, key-value cache backend, openstack oslo cache, openstack, caching, memoization [View on SkillFed](https://skillfed.io/packages/oslo-cache) · [View on PyPI](https://pypi.org/project/oslo-cache/)