/var/cache is intended for cached data from
applications. Such data is locally generated as a result of
time-consuming I/O or calculation. The application must be able to
regenerate or restore the data. Unlike
/var/spool, the cached files can be deleted
without data loss. The data must remain valid between invocations of
the application and rebooting the system.
Files located under /var/cache may be
expired in an application specific manner, by the system
administrator, or both. The application must always be able to
recover from manual deletion of these files (generally because of a
disk space shortage). No other requirements are made on the data
format of the cache directories.
The existence of a separate directory for cached data allows
system administrators to set different disk and backup policies from
other directories in /var.
| Directory | Description |
|---|---|
fonts | Locally-generated fonts (optional) |
man | Locally-formatted manual pages (optional) |
www | WWW proxy or cache data (optional) |
<package> | Package specific cache data (optional) |
The directory /var/cache/fonts should be used to store any
dynamically-created fonts. In particular, all of the fonts which are
automatically generated by mktexpk must be located in
appropriately-named subdirectories of /var/cache/fonts.
[38]
This directory provides a standard location for sites that provide a
read-only /usr partition, but wish to allow caching of
locally-formatted man pages. Sites that mount /usr as writable
(e.g., single-user installations) may choose not to use
/var/cache/man and may write formatted man pages into the
cat<section> directories in /usr/share/man directly. We
recommend that most sites use one of the following options instead:
Preformat all manual pages alongside the unformatted versions.
Allow no caching of formatted man pages, and require formatting to be done each time a man page is brought up.
Allow local caching of formatted man pages in /var/cache/man.
The structure of /var/cache/man needs to
reflect both the fact of multiple man page hierarchies and the
possibility of multiple language support.
Given an unformatted manual page that normally appears in
<path>/man/<locale>/man<section>,
the directory to place formatted man pages in is
/var/cache/man/<catpath>/<locale>/cat<section>,
where <catpath> is derived from
<path> by removing any leading
usr and/or trailing share
pathname components. (Note that the
<locale> component may be missing.)
[39]
Man pages written to /var/cache/man may
eventually be transferred to the appropriate preformatted directories
in the source man hierarchy or expired; likewise
formatted man pages in the source man hierarchy
may be expired if they are not accessed for a period of time.
If preformatted manual pages come with a system on read-only
media (a CD-ROM, for instance), they must be installed in the source
man hierarchy
(e.g. /usr/share/man/cat<section>).
/var/cache/man is reserved as a writable cache
for formatted manual pages.
Release 1.2 of this standard specified
/var/catman for this hierarchy. The path has
been moved under /var/cache to better reflect the
dynamic nature of the formatted man pages. The directory name has
been changed to man to allow for enhancing the
hierarchy to include post-processed formats other than "cat", such as
PostScript, HTML, or DVI.
[38] This standard does not currently incorporate the TeX Directory Structure (a document that describes the layout TeX files and directories), but it may be useful reading. It is located at ftp://ctan.tug.org/tex/
[39]
For example, /usr/share/man/man1/ls.1 is
formatted into /var/cache/man/cat1/ls.1, and
/usr/X11R6/man/<locale>/man3/XtClass.3x into
/var/cache/man/X11R6/<locale>/cat3/XtClass.3x.