githubEdit

RFC 7234 Cache

Cache middleware implements HTTP caching (RFC 7234). It's based on the Souinarrow-up-right HTTP cache library.

Have a look at the Souin documentationarrow-up-right if you need more information.

circle-exclamation

Features

Building RoadRunner with Cache

As it's based on the Souinarrow-up-right HTTP cache library, we can directly use the RoadRunner middleware implementation. We have to set the folder property because this middleware is located in a subdirectory.

configuration.toml
[github]
[github.token]
token = "YOUR_GH_TOKEN"

[github.plugins]
# Use the Souin third-party middleware.
cache = { ref = "master", owner = "darkweak", repository = "souin", folder = "/plugins/roadrunner" }
# others ...

[log]
level = "debug"
mode = "development"

Available storages: In-memory/Filesystem

  • nutsdb

  • badger (default one)

Distributed

  • etcd

  • olric

More info about customizing RR with your own plugins: link

Configuration

You can set each Souin configuration key under the http.cache key. There is a configuration example below.

Last updated