vapor / redis

Vapor provider for RediStack
MIT License
458 stars 57 forks source link

Add support for Vapor `Cache` protocol expiration time #188

Closed madsodgaard closed 3 years ago

madsodgaard commented 3 years ago

Adds support for setting an expiration time when using Redis as the Vapor cache via app.caches.use(.redis). See v4.44.0 for more info.

This PR also fixes #187 by adding a function to set an expiration time when setting a key to JSON:

app.redis.setex("user", toJSON: User(name: "mads"), expirationInSeconds: 10)
VaporBot commented 3 years ago

These changes are now available in 4.3.0