Buildless + Redis

Using Buildless remote caching with Redis clients

Tools that Support Redis

CCache and SCCache are examples of build tools which have support for Redis as a storage backend.

Using Buildless with Redis

Buildless supports cache clients that communicate using the Redis protocol.

SettingValue
Hostnameredis.less.build
Port6379
TLSActive, with certificate verification on
Usernameapikey (literal value)
PasswordYour API key

Obtain your account and API key

Before you configure Redis with Buildless, you'll need to setup your account and obtain your API key. You can sign up for Buildless here. To locate your API key, it depends which kind of key you want to use:

  • For individual users: Your API key is located in the welcome email and in your user settings, accessed from the Buildless Console.
  • For tenant users who wish to authorize an org-level cache (with no specific user), access your org API key in the Buildless Console at Tenant → Settings → Integration.

Authorizing your environment

The easiest and most secure way to use Buildless is via the environment variables and CLI config files. These techniques for configuring the cache keep your API key out of your source code.

Once you obtain your API key, set it in your environment via BUILDLESS_APIKEY:

echo "export BUILDLESS_APIKEY=..." >> ~/.bashrc
export BUILDLESS_APIKEY="..."

Configuring your Redis client

While the configuration method is specific to each tool, the connection URI redis://<api_key>@redis.less.build:6379 (where <api_key> is your Buildless API Key) will direct your client to the correct endpoint. You can test it using the Redis CLI:

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

Limitations with Redis protocol

Buildless' API layer can speak RESP, the Redis wire protocol. It isn't designed to be used as a full-blown Redis server, though. We focus on supporting Redis commands which relate to build caching, or which are used by popular build-caching clients.

Buildless supports GET, SET, and several other commands.