oslo.cache
Cache storage for OpenStack projects.
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 on this page — 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
oslo-cache on PyPI
pip
pip install oslo-cacheuv
uv add oslo-cachepoetry
poetry add oslo-cacheInstalling 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 the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — dogpile.cache, oslo.config, oslo.i18n, oslo.log, oslo.utils |
| Maintenance | actively maintained — 35 days since the last release |
| First released | |
| Downloads | 348,299/month — #7,343 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: oslo_cache-4.3.0-py3-none-any.whl
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
oslo.logoslo.log provides standardized logging…
permissive · top 5,000 on PyPI
oslo.vmwareoslo.vmware provides a library for common…
permissive · top 15,000 on PyPI
oslo.upgradecheckProvides a framework for writing and running…
permissive · top 15,000 on PyPI
oslo.dboslo.db provides database connectivity and ORM…
permissive · top 15,000 on PyPI
oslo.messagingOslo Messaging provides a unified API for RPC…
permissive · top 15,000 on PyPI
oslo.versionedobjectsoslo.versionedobjects provides a versioned…
permissive · top 15,000 on PyPI
glance-storeGlance Store Library provides backend storage…
permissive · top 15,000 on PyPI
oslo.serializationoslo.serialization provides serialization and…
permissive · top 5,000 on PyPI
oslo.utilsoslo.utils provides common utility functions…
permissive · top 5,000 on PyPI
oslo.middlewareoslo.middleware provides WSGI middleware…
permissive · top 15,000 on PyPI