MDL-37545 cache: fixed bug during initialisation and updating of cache config