[dokuwiki] How are page caches updated wrt in/existing links?

Hi,
DokuWiki uses wikilink1 / wikilink2 classes to designate existing /
inexisting files, resp.
I would like to know what this class information is updated when a page is
rendered from its cache.

I got to around the p_cached_output function:
when useCache() returns true, the parsed version is retrieved from cache.
else, a new version is produced and saved in the cache.

I don't understand how the link class is updated. In a sample case, I
printed out the cache dependancies.
There wasn't even the referenced link in the dependancies, but the link was
properly updated.

Thanks for all comments.

Other related posts: