Updated the way caching work so that caches can be set per dataset in a global way, this converts the cache size limit to per dataset