MDL-40677 cache: fixed bug with maxsize when setting