The virtual tree holds file system data. We thought about caching this structure, because of slowness experienced at mount time. Currently, when PackageFS is mounted, it builds packages database and visits it. Then it must create the entries for each available package, and, if installed, it has to make suitable directories and symbolic links to all of the owned files.
If PackageFS is the only method used to manage packages on the system, these information are always the same between an unmount and the next mount operation. Thus, it can be possible to save such data on disk in order to retrieve them faster.
This procedure should be implemented with a binary cache file. It is not meant to be used on any system other than the one it was created for. It is not meant to be authoritative either, i.e. if a system crash or software failure occurs it must be perfectly acceptable for the cache file to be in an inconsistent state. Furthermore at any time the cache file may be erased without losing any information.
At the moment, the PKGFSCache class provides virtual tree data caching. It is not already a binary file, but a plain one. It will become binary as soon as MMap() object developed by Jason Gunthorpe will be introduced in PackageFS.