Throw a lock around cached preference refresh.