rez-caching
БесплатноБез исполняемых скриптовНе проверенRez's two independent caches — the memcached-backed resolve cache and the on-disk package payload cache — the five settings that turn each one on, what…
от loonghao341 установка в других каталогахОб этом скилле
Rez caching
One-sentence summary: rez has two caches that share almost nothing — a memcached resolve cache that stores solves and package file reads, and a local-disk package cache that stores variant payloads — and the single most useful move when a change seems to be ignored is to disable one at a time and see which one was lying.
Skill scope: what is cached, when it goes stale, and how to prove it. For the solver internals
that a cached resolve short-circuits see rez-resolve; for the six causes of a failed resolve see
rez-resolve-troubleshooting; for a package that fails to load or was left half-installed see
rez-package-pitfalls; for the cachable attribute in a package.py see rez-package-definition.
The two caches
They are configured separately, live in different places, and fail in different ways. Naming the right one first is most of the work.
| Resolve cache | Package cache | |
|---|---|---|
| What it stores | solves, package file reads, directory listings, variant states | variant payloads — the package root directory |
| Where | a memcached server | local disk |
| Enabled by | memcached_uri (plus resolve_caching) |
cache_packages_path |
| Default | off (memcached_uri = []) |
off (cache_packages_path = None) |
| Speeds up | the solve | the runtime — loading files off shared storage |
| Inspect with | rez-memcache |
rez-pkg-cache |
| Disable for one run | rez-env --no-cache |
rez-env --no-pkg-cache |
Both are off out of the box, so a cache that is biting you is one somebody turned on. Check before you theorise:
rez-config memcached_uri
rez-config cache_packages_path
An empty list and None respectively mean neither cache is active.
Resolve caching
Backed by memcached. In a studio, a machine that performs a solve another machine already performed gets the cached result instead of re-solving.
# rezconfig.py
memcached_uri = ["127.0.0.1:11211"]
That one setting is all that is required. The related switches:
| Setting | Default | Effect |
|---|---|---|
memcached_uri |
[] |
memcached servers; empty means no memcaching at all |
resolve_caching |
True |
cache solves, but only when memcached_uri is non-empty |
cache_package_files |
True |
cache package.py / package.yaml reads |
cache_listdir |
True |
cache directory traversals |
resource_caching_maxsize |
-1 |
in-process resource cache size; 0 disables, -1 is unlimited |
resolve_caching = True with memcached_uri = [] is not caching. The setting is a permission
slip, not a switch — the URI list is what turns it on.
What invalidation actually covers
Each cached solve stores solver state, the timestamps of the packages it saw, and the variant state of every variant involved. For the filesystem repository the variant state is the last modified time of the file backing the variant. Two consequences:
- Releasing a newer version that would change the result does invalidate the entry. A cached
foo-1+<2pointing at1.0.0is discarded once1.0.1exists. - Changing a variant's backing file does invalidate the entry, because its state changed.
The gap is the case upstream calls out: "hacking" a released package into production in a way that does not produce a new version and does not move the file rez is watching. That entry is not invalidated, and you get the old answer.
rez-memcache
rez-memcache --stats # hit/miss ratios and memory per server
rez-memcache --flush # drop every cache entry
rez-memcache --reset-stats # zero the counters, keep the entries
rez-memcache --warm # pre-populate with visible packages
rez-memcache --poll # continuously show get/sets per second
--stats is the one to reach for first — a high hit ratio on a studio server is the whole point of
the cache, and a ratio near zero means it is not doing anything.
With no servers configured — the default, since memcached_uri is empty — every rez-memcache
subcommand prints memcaching is not enabled. to stderr and exits 1. That is worth knowing
before you put it in a script: exit 1 here means "caching is off", which is the normal state, not a
fault. If you only care whether memcaching is configured, redirect stderr and treat 1 as
informational:
rez-memcache --stats 2>&1 || true
--flush is the blunt instrument. It is safe — the cache is a cache — but on a busy studio server
it pushes the cost of every subsequent solve back onto the machines that were sharing results.
To see memcached traffic per operation, set REZ_DEBUG_MEMCACHE (or debug_memcache) for
everything, or debug_resolve_memcache for the resolve cache alone.
Package caching
Copies variant payloads from shared storage onto local disk so that running, say, a Python process does not pull every source file across the network.
Установить rez-caching в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл rez-caching?
Rez's two independent caches — the memcached-backed resolve cache and the on-disk package payload cache — the five settings that turn each one on, what invalidates an entry and what silently does not, rez-memcache and rez-pkg-cache for inspecting and flushing them, and the decision tree for 'I changed the package and nothing took effect'. Use when a resolve is slow, when a package change appears to be ignored, or when you need to prove a stale cache is or is not the cause. Covers Rez 3.4.0.
Как установить скилл rez-caching?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл rez-caching запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic