E5BE GitHub - vitalets/global-cache: A key-value cache for sharing data between parallel workers and test runs. · GitHub
[go: up one dir, main page]

Skip to content

vitalets/global-cache

Repository files navigation

⚡ global-cache

Speed up E2E tests by caching data between workers

lint test license

Why use it?

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.

How it works?

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:

Global cache schema

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.

Packages

Check out the documentation for your test runner integration:

Feedback

Feel free to share your feedback and suggestions in the issues.

License

MIT

About

A key-value cache for sharing data between parallel workers and test runs.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors

0