Warm-up and Caching Strategies

May 30, 2026 | 5 min read

Artifact Cache

Compiled artifacts are cached locally in:

~/.pyvorin/cache/

The cache key is a SHA-256 hash of the source + function name + backend + opt_level.

Cache Hit

When a matching cache entry exists, Pyvorin skips the remote compile and loads the native binary directly:

[dim]Cache hit: loading native binary[/dim]

Cache Miss

On cache miss, a remote compile is requested. The returned artifact is stored for future runs.

Cache Management

# View cache size
du -sh ~/.pyvorin/cache

# Clear cache
rm -rf ~/.pyvorin/cache/*

Warm-Up Strategies

  • Pre-compile critical functions during deployment.
  • Run a warm-up script on container start.
  • Use pyvorin compile in CI to populate shared cache volumes.