Review list and map iteration.
Check cache ID before resetting size.
Do not shutdown the cache when switching user (see #10502)
Modify the way the registry is accessed.
Merge pull request #857 from jburel/rebased/develop/cache_size

Cache size (rebased onto develop)