also, this changes behaviour, when sizeinBytes of cache == 0, this is the same as the cache being disabled. We should not throw an error here