CacheWorker: Add support for max cache size

We were handling the subscription based cache size, but were lacking the
global limit.
10 jobs for !707 with add_cache_settings in 7 minutes and 30 seconds (queued for 5 seconds)
latest merge request