Speed up E2E tests by caching data between workers
When running E2E tests in parallel, you might need to:
✅ Authenticate user only once
✅ Seed database only once
✅ Compute heavy values on demand
✅ Reuse heavy-computed values across workers
✅ Persist heavy-computed values between test runs
Global Cache makes all of this possible.
The first worker that requests a value becomes responsible for computing it. Others wait until the result is ready — and all workers get the same value. The value is cached in memory or on the filesystem and reused by subsequent workers and test runs:
What happens under the hood?
Under the hood, Global Cache spins up a tiny HTTP server, with a simple REST API for getting and setting values. This server is a single storage point for all workers. When a worker needs a value, it performs a GET request to the server, and either gets a cached value instantly or computes the value and sets it via the POST request.
Check out the documentation for your test runner integration:
Feel free to share your feedback and suggestions in the issues.
