Fix error when cache size is set to zero