Fix integer overflow in collection cache manager

Fix integer overflow in collection cache manager leading to negative cache size (so collection cache doesn't grow).