Fixed issue where there was a chance to be no items in the cache when only
one cache is defined in the config.