Renaming of file breaks Permalink

Ok I now found what happens. Seems to be the problem described here with the missing UUID in the Cache. So I assume there are two ways to solve this?

  1. Use $field->permalinksToUrls() on the writer fields. This seems to fix the problem. But are there any performance problems with this?
  2. Use a hook on file.changeName:after and call \Kirby\Uuid\Uuids::populate(type: ‘file’)?
'file.changeName:after' => function (Kirby\Cms\File $newFile, Kirby\Cms\File $oldFile) {
            \Kirby\Uuid\Uuids::populate(type: 'file');
        }