Caching #480
Değerlendirici yok
Etiketler
Etiket Yok
A: API
A: Backend
A: Federation
A: Front-End
A: I18N
A: Meta
A: Security
Build
C: Bug
C: Discussion
C: Enhancement
C: Feature
Compatibility
Dependency
Design
Documentation
Good first issue
Help welcome
Mobile
Rendering
S: Blocked
S: Duplicate
S: Incomplete
S: Instance specific
S: Invalid
S: Needs Voting/Discussion
S: Ready for review
Suggestion
S: Voted on Loomio
S: Wontfix
Kilometre Taşı Yok
Proje yok
Atanan Kişi Yok
2 Katılımcı
Bildirimler
Bitiş Tarihi
Bitiş tarihi atanmadı.
Bağımlılıklar
Bağımlılık yok.
Referans: Plume/Plume#480
Yükleniyor…
Tablo ekle
Yeni konuda referans
Herhangi bir açıklama sağlanmadı.
"cache" Dalını Sil
Bir dalı silmek kalıcıdır. Her ne kadar silinen dal tamamen kaldırılana kadar çok kısa bir süre yaşamını sürdürse de, çoğu durumda bu işlem GERİ ALINAMAZ. Devam edilsin mi?
Try to cache static resources.
Static non media file's timestamps are hashed at compile tome so that modifying them invalidate old cache.
For some reason, plume-front.wasm isn't loaded from cache, even if it contains the right headers.I changed nothing and now it is? I guess I'm ok with it
I'll look into adding Etag support tooAll response made from templates and not containing a form are now Etag-cached
👀
@ -5,0 +13,4 @@
.spawn()
.expect("failed find command");
let sort = Command::new("sort")
i'd rather this wasn't random, but deterministic
such as the file's she256sum
@ -5,0 +13,4 @@
.spawn()
.expect("failed find command");
let sort = Command::new("sort")
What is your issue with it being random? It's fixed at compile time, so assuming a production server, which may restart but won't recompile often, the cache will be ok. My first through was using git commit sha, but this may be unnecessary information disclosure
@ -5,0 +13,4 @@
.spawn()
.expect("failed find command");
let sort = Command::new("sort")
if nothing about the code changes, the cache_id shouldn't change either
Codecov Report
@ -5,0 +13,4 @@
.spawn()
.expect("failed find command");
let sort = Command::new("sort")
The build won't be run again if the code didn't changed, so the ID will not change.
You should probably remove it from
Cargo.toml
too.I totally forgot about that
@ -5,0 +13,4 @@
.spawn()
.expect("failed find command");
let sort = Command::new("sort")
yes, in our development environment that is true, but not for anyone building packages or container images of our software. they always start from a clean slate
👍
@ -5,0 +13,4 @@
.spawn()
.expect("failed find command");
let sort = Command::new("sort")
btw, is there no way to do this in rust?
@ -5,0 +13,4 @@
.spawn()
.expect("failed find command");
let sort = Command::new("sort")
I think there are plenty, but I'm lazy and it's a build script. I prototyped using bash, so my rust code is basically bash translated (if you find it really bad, I can change that but I don't know if it's really useful)
@ -5,0 +13,4 @@
.spawn()
.expect("failed find command");
let sort = Command::new("sort")
nah, i was just curious
@ -11,0 +37,4 @@
.merge(HtmlCt(self.0).respond_to(r)?)
.header(ETag(EntityTag::strong(etag)))
.ok()
}
Probably obvious, but why do we disable caching on pages with a form?
@ -11,0 +37,4 @@
.merge(HtmlCt(self.0).respond_to(r)?)
.header(ETag(EntityTag::strong(etag)))
.ok()
}
If the page contain a form, the csrf token will be cached, and may no longer match user's cookies. As these tokens are added later by a fairing, there is no way to detect the page changed here. The other solution could be to allow caching of page and for rocket_csrf to remove ETag when appropriate
👍 Thanks!