Buildless + CCache

Cache your C-like artifacts with Buildless

Using CCache with Buildless

CCache is one of the original build caching tools to reach wide adoption; it is released open-source under GNU GPLv3 and designed primarily for use with C, C++, and similar toolchains.

What do you mean by C-like toolchains?

Any toolchain which involves calling a series of tools via the command-line, with file inputs and command-line flags, can typically be handled well by CCache. The process goes roughly like this:

  1. Collect compiler version and variant info
  2. Collect all command-line flags for a given compiler command
  3. Hash all flags and file-based inputs to the command
  4. Fetch from the cache at that hash, considering the result a hit if available
  5. Optional: Push to the cache if no hit was encountered, and the object had to be rebuilt

Supported Backends

You can use CCache with Buildless in several different ways, depending on your needs.

Buildless as CCache HTTP storage backend

Buildless provides a compliant API endpoint which can be used with CCache's HTTP backend; in this case, you should use the following information:

SettingValue
Hostname/Endpointhttps://ccache.less.build/cache/generic
TLSActive; certificate verification on
Auth modeHTTP Basic
Usernameapikey
PasswordYour API key

In HTTP mode, CCache submits store requests as PUT calls, and fetches keys with GET calls. Pretty straight forward and easy.

Buildless as Redis-based Backend

The Buildless API can speak Redis; it is supported to use CCache's Redis backend with our API endpoints:

redis-cli --user apikey --pass "$BUILDLESS_APIKEY" -h redis.less.build --tls

Find full connection configuration info on our Buildless + Redis page.