[master 10/12] Add generic classes for cache and cache stats