/var/cache
is intended for cached data fromapplications. Such data is locally generated as a result oftime-consuming I/O or calculation. The application must be able toregenerate or restore the data. Unlike/var/spool
, the cached files can be deletedwithout data loss. The data must remain valid between invocations ofthe application and rebooting the system.
Files located under /var/cache
may beexpired in an application specific manner, by the systemadministrator, or both. The application must always be able torecover from manual deletion of these files (generally because of adisk space shortage). No other requirements are made on the dataformat of the cache directories.
Rationale
The existence of a separate directory for cached data allowssystem administrators to set different disk and backup policies fromother 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 anydynamically-created fonts. In particular, all of the fonts which areautomatically generated by mktexpk must be located inappropriately-named subdirectories of /var/cache/fonts
.[38]
Other dynamically created fonts may also be placed in this tree,under appropriately-named subdirectories of/var/cache/fonts
.
This directory provides a standard location for sites that provide aread-only /usr
partition, but wish to allow caching oflocally-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 thecat<section>
directories in /usr/share/man
directly. Werecommend 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 bedone 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 toreflect both the fact of multiple man page hierarchies and thepossibility 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 leadingusr
and/or trailing share
pathname components. (Note that the<locale>
component may be missing.)[39]
Man pages written to /var/cache/man
mayeventually be transferred to the appropriate preformatted directoriesin the source man
hierarchy or expired; likewiseformatted man pages in the source man
hierarchymay be expired if they are not accessed for a period of time.
If preformatted manual pages come with a system on read-onlymedia (a CD-ROM, for instance), they must be installed in the sourceman
hierarchy(e.g. /usr/share/man/cat<section>
)./var/cache/man
is reserved as a writable cachefor formatted manual pages.
Rationale
Release 1.2 of this standard specified/var/catman
for this hierarchy. The path hasbeen moved under /var/cache
to better reflect thedynamic nature of the formatted man pages. The directory name hasbeen changed to man
to allow for enhancing thehierarchy to include post-processed formats other than "cat", such asPostScript, HTML, or DVI.
[38] This standard does not currently incorporate the TeX DirectoryStructure (a document that describes the layout TeX files anddirectories), but it may be useful reading. It is located atftp://ctan.tug.org/tex/
[39] For example, /usr/share/man/man1/ls.1
isformatted into /var/cache/man/cat1/ls.1
, and/usr/X11R6/man/<locale>/man3/XtClass.3x
into/var/cache/man/X11R6/<locale>/cat3/XtClass.3x
.