Comments (9)
You're right, my bad, I'll fix that too for the next release (I hope to release this week). Thank you for this feedback.
from souin.
Hello @let4be, thank you for your feedback. Can you send an example to reproduce please ?
from souin.
Sorry, I don't have an example.
I was just going through the code and noticed there's no longer a .Revalidate()
call in this particular if
branch: https://github.com/darkweak/souin/blob/v1.6.40/pkg/middleware/middleware.go#L399
Meaning we will NEVER revalidate with the upstream if response was located in the cache, which is a drastic change introduced in this PR
from souin.
This if
condition is for the fresh cache, it doesn't need to revalidate here unlike the stale cache condition https://github.com/darkweak/souin/blob/v1.6.40/pkg/middleware/middleware.go#L428 which have the Revalidate call https://github.com/darkweak/souin/blob/v1.6.40/pkg/middleware/middleware.go#L451. Maybe I'm missed something in the RFC.
from souin.
Revalidation is related to the conditional request, as far as I understood we cannot always know that cached version is fresh if client is using one of conditional requests(https://datatracker.ietf.org/doc/html/rfc7232)
Before this PR there was a .Revalidate()
call in this if
branch...
from souin.
@let4be Can you try with that commit a36be95b162f7847590d01a0d5c37a1abd4fd833
and tell me if it's all good now?
from souin.
Commented here: a36be95
from souin.
Fixed in a9569b828220655ca1039216cd02a75a1d67eed2
from souin.
Looks better!
I'm still not exactly sure if we update cached headers when remote said NotModified(and headers only) and if we reuse cached body in this case with new headers
from souin.
Related Issues (20)
- [Traefik plugin] panic after deploy (docker service update) and when doing Apache AB test HOT 15
- Prometheus metrics not incrementing HOT 2
- Add support for in-memory NutsDB HOT 1
- fatal error: concurrent map writes HOT 2
- mode bypass is ignored in global caddy config HOT 1
- Can't be built with FrankenPHP on amd64 HOT 1
- Redis keys not expiring HOT 13
- public,max-age=31536000, immutable HOT 2
- Nginx / apache example HOT 2
- Which one to use with caddy? HOT 2
- Better explanation on mode option HOT 1
- Cache corruption HOT 14
- New cache engine, implementation rueidis
- panic in Caddy plugin HOT 4
- order cache before rewrite - question HOT 1
- API doesn't work if Caddy's hostname is in format of `http://10.0.0.1:8080` rather than `:8080` HOT 5
- Feature request: customization of cache key HOT 8
- Surrogate keys API seems broken with multiple sites HOT 7
- Redis stops working after a short moment? HOT 5
- souin on traefik get api souin url HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from souin.