- Implements an Openresty setup for serving static images
- Caches an image for after 2nd request
- Allow purging cache for a specific image
- Start:
docker compose up -d - Stop:
docker compose down
Tests are located in __tests__ folder and show how caching and purging works.
X-Cache-Status header indicates if the image was obtained from cache.
- Go to tests folder:
cd __tests__ - Install dependencies:
npm install - Run tests:
npm test