Cache directory resembles the notes hierarchy. Each file corresponds to the note file, keeping at least three lines: versioned magic number, inode number and ctime value in seconds. All of that is used to determine if note was changed and cache is valid. All other lines contain the links present in the note. Any change to the file leads to ctime changing and cache invalidation with full parsing of the note. If note's cache is valid, then also the part of HTML is also kept in .html-file nearby. It contains all the data till closing
-tag.
Links and backlinks are generated every time.