feat(smalltrip): TODO PersistentCache middlware

This commit is contained in:
Guz
2025-02-24 08:05:37 -03:00
parent 054bcefdd7
commit dec6bcb1a1

View File

@@ -28,6 +28,13 @@ func SmartCache(options ...CacheOption) Middleware {
return Cache(options...)
}
// TODO: PersistentCache is a smarter implementation of SmartCache that handles requests
// with authorization, Cache-Control from the client, and stores responses into
// a persistent storage solution like Redis.
func PersistentCache(options ...CacheOption) Middleware {
return SmartCache(options...)
}
type CacheOption func(*directives)
func CacheMaxAge(t time.Duration) CacheOption {