github vapor/vapor 4.39.0
Add cache protocol

latest releases: 4.94.1, 4.94.0, 4.93.2...
3 years ago
This patch was authored by @tanner0101 and released by @0xTim.

Adds Cache protocol and application helpers.

// Configure application cache
app.caches.use(.memory)

// Use cache
app.cache.get("foo", as: String.self)

// Use in request handler
req.cache.get("foo", as: String.self)

Includes .memory cache which stores values in a thread-safe dictionary.

Don't miss a new vapor release

NewReleases is sending notifications on new releases.