An open API service indexing awesome lists of open source software.

https://github.com/straight-shoota/nginx-cache-test

Test for nginx cache setup
https://github.com/straight-shoota/nginx-cache-test

nginx-configuration testing

Last synced: 9 months ago
JSON representation

Test for nginx cache setup

Awesome Lists containing this project

README

          

This is just a simple test setup to explore nginx caching capabilities regarding cache bypass and purge.

## Usage

```
./setup.sh # Enables nginx server config and restarts nginx
crystal backend.cr # Start simple backend server with encrementing counter and caching header
./test.sh # Run some curls agains the nginx frontend to ensure caching functionality
```

1. Subsequent requests are served from Nginx's proxy_cache
2. If the request has header "cachepurge: true", nginx cache is bypassed and the new response cached for future requests
3. Requests with param "preview_token" are never cached

[Github Repository](https://github.com/straight-shoota/nginx-cache-test)