skillfed

oslo.cache

Cache storage for OpenStack projects.

oslo-cache v4.3.0 348.3K downloads/30d#7,343 on PyPI
Permissive license Apache-2.0 Active released

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-cache

uv

uv add oslo-cache

poetry

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

Environment :: OpenStackIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Typing :: Typed

Tags

openstack caching librarydogpile.cache wrappermemcached integrationmemoization frameworkdistributed cache abstractionkey-value cache backendopenstack oslo cache
openstackcachingmemoization

More Application Frameworks packages