Skip to content

Add a Redis-backed ActionCache

Adam Coldrick requested to merge sotk/action-cache/redis into master

Description

This MR adds a new ActionCache implementation, using Redis to store the mapping between Action digests and the relevant ActionResult.

Also included in the MR are an improvement to the bgd execute command command, and a docker-compose example BuildGrid deployment using Redis for CAS and AC.

Validation

Use the example docker-compose file to spin up a BuildGrid instance running the new code

docker-compose -f docker-compose-examples/redis-action-cache.yaml up -d

Then, use the bgd execute command command to test the cache

tox -e venv -- bgd execute command --enable-caching buildgrid ls   # This should execute the command
tox -e venv -- bgd execute command --enable-caching buildgrid ls   # This should be a cache hit

A cache hit will have fewer operation messages in the output from that command, or you can check the server logs to verify that the cache was hit.

Issues addressed

One possible solution to #280 (closed)

Merge request reports

Loading