Vug::CacheManager
Constructors
new(config : Config, memory_cache : MemoryCache | Nil = nil)
SourceInstance methods
Retrieves a cached path for the given URL.
Lookup order:
- Config-backed storage (
on_loadcallback) โ persistent store - In-memory cache โ fast ephemeral layer
Stores a URL โ path mapping in the memory cache layer only.
Note: This method does not invoke the on_save config callback.
Persistence is handled earlier in the pipeline by
ImageProcessor::Default#process_bytes, which calls @config.save
before storing the result in the cache. This design avoids double-save
when the image processor has already persisted the data.
If you need to trigger persistence, call @config.save explicitly
or route through the full Fetcher pipeline.