Drops cached shard mappings so the next read resolves them from KV again.
CollegeDB caches a key's shard in memory for mappingCacheTtlMs, which makes
that TTL a staleness window: a mapping changed elsewhere, by another isolate
or by a KVShardMapper built directly, is not visible here until the
entry expires. reassignShard already clears what it changes, so this
is for changes made outside CollegeDB's own routing.
Re-running initialize is not a substitute. It reuses the existing
mapper when the bindings and options are unchanged, precisely so the cache
survives the per-request initialization the Workers examples use.
Parameters
Optionalkey: string
Logical key to drop, or omit to drop every cached mapping
Drops cached shard mappings so the next read resolves them from KV again.
CollegeDB caches a key's shard in memory for
mappingCacheTtlMs, which makes that TTL a staleness window: a mapping changed elsewhere, by another isolate or by a KVShardMapper built directly, is not visible here until the entry expires. reassignShard already clears what it changes, so this is for changes made outside CollegeDB's own routing.Re-running initialize is not a substitute. It reuses the existing mapper when the bindings and options are unchanged, precisely so the cache survives the per-request initialization the Workers examples use.