In-process memory cache backend with TTL support.
Default backend — zero dependencies, dict-based. Free-threading safe via threading.Lock on all mutations.
cache.backends.memory
| Name | Type | Default | Description |
|---|---|---|---|
type
|
|
— | |
qualified_name
|
|
— | |
element_type
|
|
— | |
description
|
|
— | |
source_file
|
|
— | |
line_number
|
|
— | |
is_autodoc
|
|
— | |
autodoc_element
|
|
— | |
_autodoc_template
|
|
— | |
_autodoc_url_path
|
|
— | |
_autodoc_page_type
|
|
— | |
title
|
|
— | |
doc_content_hash
|
|
— |
Symbols on this page
MemoryCacheBackend
class
In-process dict + TTL cache backend.
Suitable for single-process development and small apps. Not shared between workers in multi-process production. Thread-safe for free-threaded Python (3.14t).
View source · /home/runner/work/chirp/chirp/site/../src/chirp/cache/backends/memory.py:1