Skip to content

MES-719: Local Caching#38

Open
markovejnovic wants to merge 8 commits intomainfrom
marko/mes-719-local-caching-pt-2
Open

MES-719: Local Caching#38
markovejnovic wants to merge 8 commits intomainfrom
marko/mes-719-local-caching-pt-2

Conversation

@markovejnovic
Copy link
Collaborator

No description provided.

@mesa-dot-dev
Copy link

mesa-dot-dev bot commented Feb 13, 2026

Mesa Description

This PR introduces a new, asynchronous, file-based caching library designed to improve performance by storing data locally on disk.

The core of this new functionality resides in the new lib/cache module, which provides a generic, trait-based framework for caching operations.

Key changes include:

  • File-Based Cache (fcache): An async-safe FileCache implementation that stores entries as files. It manages the total cache size and automatically evicts items when the max_size_bytes limit is reached.
  • LRU Eviction Policy: A new LruEvictionTracker runs in a background task to efficiently track item usage and remove the least recently used entries from the cache.
  • Generic Cache Traits: A set of ReadableCache and WritableCache traits define a unified interface for both synchronous and asynchronous cache implementations.
  • Library Structure: The project is now configured as a library (lib/lib.rs), creating a clear home for shared components like the new cache and I/O utilities.

Description generated by Mesa. Update settings

Copy link

@mesa-dot-dev mesa-dot-dev bot left a comment

Choose a reason for hiding this comment

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

Performed full review of d6db315...26ecc80

Analysis

  1. The caching library relies on nightly-only Rust features but doesn't enable all necessary unstable gates, making it incompilable on both stable and nightly.

  2. The FileCache implementation always wipes the target directory on initialization, preventing cache persistence across restarts and undermining the purpose of a file-backed cache.

  3. Eviction operations mix synchronous filesystem calls in async workers without proper blocking isolation, risking runtime stalls during large batch evictions.

  4. The architecture splits caching into a separate crate, but the integration has inconsistencies that may impact production usability.

Tip

Help

Slash Commands:

  • /review - Request a full code review
  • /review latest - Review only changes since the last review
  • /describe - Generate PR description. This will update the PR body or issue comment depending on your configuration
  • /help - Get help with Mesa commands and configuration options

0 files reviewed | 1 comments | Edit Agent SettingsRead Docs

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