Skip to content

Design Doc : Add pluggable cache backend#1849

Draft
mpiannucci wants to merge 4 commits into
mainfrom
design-docs/pluggable-cache
Draft

Design Doc : Add pluggable cache backend#1849
mpiannucci wants to merge 4 commits into
mainfrom
design-docs/pluggable-cache

Conversation

@mpiannucci
Copy link
Copy Markdown
Collaborator

@mpiannucci mpiannucci commented Mar 16, 2026

See comments for points of specific emphasis

#960

@mpiannucci mpiannucci changed the title Add design doc for pluggable cache backend Design Doc : Add pluggable cache backend Mar 16, 2026

### 1. `CacheBackend` Trait

A new trait abstracts over cache storage. Since external backends require serialized data, **all backends operate on bytes**. Deserialization happens in `AssetManager` on every cache hit.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will introduce a performance hit. The alternative would be a specific cache interface with types specified so in memory could cache everything as full types


**FileCache** (future) — local disk-backed cache using a path on a local filesystem. Config: directory path, max size.

### 3. `CachingConfig` — Current State and Evolution
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the biggest area of contention for me: We use quick cache with its specific weighting system and limits but not all cache backends will work with that kind of an interface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant