System Administration Guide, Volume 1

Managing Your Cache File Systems With cachefspack

For general use, CacheFS operates automatically, without requiring any action from the user. Files are cached on a most recently used basis. With the packing feature, you can take a more active role in managing your cache by ensuring that certain files or directories are always updated in the cache.

Packing enables you to specify files and directories to be loaded in the cache. It ensures that current copies of these files are available in the cache.

The packing list contains the names of specific files and directories. It can also contain other packing lists. This saves you having to specify individual files and directories in case you have many items to pack in your cache.

The cachefspack command provides you with added control of your CacheFS file systems, employing the packing functionality.

How to Pack Files in the Cache

Pack files in the cache using the cachefspack command.

$ cachefspack -p filename


Specifies that you want the file or files packed. This is also the default. 


Specifies the name of the file or directory you want packed in the cache. When you specify a directory, all of its subdirectories are also packed. For more information, see cachefspack(1M).

Examples--Packing Files in the Cache

The following example shows the file projects specified to be packed in the cache.

$ cachefspack -p projects

The following example shows several files specified to be packed in the cache.

$ cachefspack -p projects updates master_plan 

The following example shows a directory specified to be packed in the cache.

$ cachefspack -p /usr/openwin/bin