Comments (6)
Hello @TNAJanssen I saw your comment here caddyserver/cache-handler#26 (comment). I'm on it on this PR #455 to fix that in the core HTTP cache.
I assume you still get the STALE_{your key}
in the keys list (/souin-api/souin
).
from souin.
Hi @darkweak,
I can provide you with all the outputs if you like, but the /surrogate_keys only holds the STALE_{key} but the /souin will still hold STALE_{key} and {key} and nothing is purged. When removing the key from Redis for example it will load the data again.
What can i do to help?
from souin.
After loading a page that get cached these are the results:
/souin
[
"GET-https-/api/00000000-0000-0000-0000-000000000000/relations/00000000-0000-0000-0000-000000000001-application/ld+json--00000000-0000-0000-0000-000000000002{-VARY-}Accept:;Content-Type:application/ld+json;Authorization:;Origin:;Api-Key:00000000-0000-0000-0000-000000000002",
"STALE_GET-https-/api/00000000-0000-0000-0000-000000000000/relations/00000000-0000-0000-0000-000000000001-application/ld+json--00000000-0000-0000-0000-000000000002{-VARY-}Accept:;Content-Type:application/ld+json;Authorization:;Origin:;Api-Key:00000000-0000-0000-0000-000000000002"
]
And surrogate_keys
{
"/api/00000000-0000-0000-0000-000000000000/relations/private/00000000-0000-0000-0000-000000000001": ",GET-https-%2Fapi%2F00000000-0000-0000-0000-000000000000%2Frelations%2F00000000-0000-0000-0000-000000000001-application%2Fld%2Bjson--00000000-0000-0000-0000-000000000002%7B-VARY-%7DAccept%3A%3BContent-Type%3Aapplication%2Fld%2Bjson%3BAuthorization%3A%3BOrigin%3A%3BApi-Key%3A00000000-0000-0000-0000-000000000002",
"STALE_/api/00000000-0000-0000-0000-000000000000/relations/private/00000000-0000-0000-0000-000000000001": ",STALE_GET-https-%2Fapi%2F00000000-0000-0000-0000-000000000000%2Frelations%2F00000000-0000-0000-0000-000000000001-application%2Fld%2Bjson--00000000-0000-0000-0000-000000000002%7B-VARY-%7DAccept%3A%3BContent-Type%3Aapplication%2Fld%2Bjson%3BAuthorization%3A%3BOrigin%3A%3BApi-Key%3A00000000-0000-0000-0000-000000000002"
}
And after i purge the surrogate key: /api/ca9d98c3-0acb-4760-a63a-61aae5592d7a/relations/private/feecaf7a-55af-409c-9539-906f76fecfa1
The API's will give me the following results:
[
"GET-https-/api/00000000-0000-0000-0000-000000000000/relations/00000000-0000-0000-0000-000000000001-application/ld+json--00000000-0000-0000-0000-000000000002{-VARY-}Accept:;Content-Type:application/ld+json;Authorization:;Origin:;Api-Key:00000000-0000-0000-0000-000000000002",
"STALE_GET-https-/api/00000000-0000-0000-0000-000000000000/relations/00000000-0000-0000-0000-000000000001-application/ld+json--00000000-0000-0000-0000-000000000002{-VARY-}Accept:;Content-Type:application/ld+json;Authorization:;Origin:;Api-Key:00000000-0000-0000-0000-000000000002"
]
and surrogate_keys
{
"STALE_/api/00000000-0000-0000-0000-000000000000/relations/private/00000000-0000-0000-0000-000000000001": ",STALE_GET-https-%2Fapi%2F00000000-0000-0000-0000-000000000000%2Frelations%2F00000000-0000-0000-0000-000000000001-application%2Fld%2Bjson--00000000-0000-0000-0000-000000000002%7B-VARY-%7DAccept%3A%3BContent-Type%3Aapplication%2Fld%2Bjson%3BAuthorization%3A%3BOrigin%3A%3BApi-Key%3A00000000-0000-0000-0000-000000000002"
}
from souin.
@TNAJanssen Can you try the PR before I merge it to be sure it solves your issue?
Using xcaddy build --with GitHub.com/darkweak/souin/plugins/caddy@55c27a0642bb6f796f29c55e47d0609b8a37fbb9 --with GitHub.com/darkweak/souin@55c27a0642bb6f796f29c55e47d0609b8a37fbb9
from souin.
Yes, i will try it in a couple of hours! Thanks
from souin.
After purging, it indeed does reload from the server! Good work!
from souin.
Related Issues (20)
- 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
- Fail to build with go < 1.21 HOT 2
- Souin doesn't cache conditional request after cache miss
- Cache-Control: stale-while-revalidate HOT 1
- Redirects Hangs: How to exclude redirects from Caching HOT 11
- Prom Metrics not Incrementing HOT 1
- Caddy plugin does not build HOT 5
- Feature request: actual custom key generation HOT 11
- Separate cache entry is created for Safari browser HOT 3
- Update Nutsdb to latest version 1.0.4 HOT 1
- Error when trying to pull plugin [Traefik]
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.