perf($cacheFactory): skip LRU bookkeeping for caches with unbound capacity

Fixes #6193
Closes #6226