mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-09-10 10:45:57 +03:00
Add immutable caching for vault assets
The URLs are cachebusted, so updates will still be applied cleanly and immediately
This commit is contained in:
@@ -97,7 +97,7 @@ pub struct Cached<R>(R, String);
|
|||||||
impl<R> Cached<R> {
|
impl<R> Cached<R> {
|
||||||
pub fn long(r: R) -> Cached<R> {
|
pub fn long(r: R) -> Cached<R> {
|
||||||
// 7 days
|
// 7 days
|
||||||
Self(r, String::from("public, max-age=604800"))
|
Self::ttl(r, 604800)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn short(r: R) -> Cached<R> {
|
pub fn short(r: R) -> Cached<R> {
|
||||||
|
Reference in New Issue
Block a user