SPIP uses various folders to look for the files that it needs to operate. More on this subject here: The concept of path. When it uses the function
find_in_path — a function which is essential for three other functions:
recuperer_fond, to look for a file to be included by a template or if it uses the
#CHEMIN tab —, then all of the paths are searched through until the sought-after file is located. These numerous searches create frequent, repetitive disk accesses which would be better to be restricted in number if possible.
For this reason, SPIP uses the
tmp/cache/chemin.txt file to cache all of the matches between a requested file and its actual logical location as found in one of the path’s sequenced directories.
With this accomplished, whenever a file is requested, SPIP first checks to see if the path for that file is in the cache. If it’s not already there, then SPIP proceeds to calculate its location and updates the correspondence table with a new entry for the newly located file.
This cache file is recreated when calling with the
var_mode=recalcul parameter in the URL, or as a direct consequence of manually emptying the cache in the administrative interface.