#1309

fix: reset memory usage on cache clear

OpenAetherancewants to merge intofrom

Summary

RawCache::clear() removed all cached entries but did not reset the per-shard memory usage. This left usage() and the memory usage metric with stale values and affected accounting after the cache was reused.

This PR resets the usage during cache clearing and updates the corresponding metric. It also adds a regression test covering normal clear, repeated clear, and insertion after clear.

ref: #973