mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-05-08 05:54:41 -05:00
[PR #1545] [MERGED] Client caching #21170
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/1545
Author: @RealOrangeOne
Created: 3/27/2021
Status: ✅ Merged
Merged: 3/28/2021
Merged by: @dani-garcia
Base:
master← Head:icon-client-cache📝 Commits (3)
b22564cCache icons on the client131348aAdd immutable caching for vault assets6209e77Icons should always be cached using full TTL📊 Changes
2 files changed (+11 additions, -7 deletions)
View changed files
📝
src/api/icons.rs(+2 -2)📝
src/util.rs(+9 -5)📄 Description
Cache icons on the client too, to reduce requests when loading the homepage.
Caching without
immutablewill still issue requests, and because Rocket doesn't support conditional GETs, it's basically like not caching at all.This also caches vault static files, which are cachebusted anyway so updates will still work fine. I've not changed the
/route for this reason.Bitwarden upstream doesn't do these, but they also use cloudflare for a CDN which makes this far less of an issue. For home users who don't use a global CDN, this should make quite a difference!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.