Skip to content
Joel Rosdahl edited this page Oct 17, 2022 · 4 revisions

Ccache 4.4+ has support for using network filesystems to communicate with a server for the purpose of sharing cache results with others. This page contains hints on how to set up such a server for use with ccache.

See the remote storage backends section in the ccache manual for details on how to configure ccache.

See also HTTP storage and Redis storage.

NFS

See Linux NFS-HOWTO for tips on how to set up a new server.

  1. Make sure that the NFS server is mounted on all the NFS clients:

    mount YOUR_SERVER:/cache /mnt/cache
  2. Add remote_storage = file:///mnt/cache to your ccache configuration (or set CCACHE_REMOTE_STORAGE=file:///mnt/cache if you're using environment variables).

A downside with this setup is that it has no automatic cleanup of obsolete cache entries. You can however set up periodic cleanup yourself by running ccache with the --trim-dir option, e.g. via cron.

Clone this wiki locally