Comments (7)
Hello @crummy sorry for the delay. The max-age=0
in the Cache-Control
header force the revalidation. The new version I'm working on should decrease the response time, you can preview that version using xcaddy build --with github.com/darkweak/souin/plugins/caddy@ bbb3ba92593cfad8fa9d1bf6ec69e992b960dd52 --with github.com/darkweak/souin@ bbb3ba92593cfad8fa9d1bf6ec69e992b960dd52
from cache-handler.
I ran xcaddy build --with github.com/darkweak/souin/plugins/caddy@bbb3ba92593cfad8fa9d1bf6ec69e992b960dd52 --with github.com/darkweak/souin@bbb3ba92593cfad8fa9d1bf6ec69e992b960dd52
then copied over the binary and reloaded. When I did so I received this output:
> sudo caddy reload
2023/03/01 18:49:29.917 INFO using adjacent Caddyfile
2023/03/01 18:49:29.920 WARN Caddyfile input is not formatted; run the 'caddy fmt' command to fix inconsistencies {"adapter": "caddyfile", "file": "Caddyfile", "line": 2}
Error: sending configuration to instance: caddy responded with error: HTTP 400: {"error":"loading config: loading new config: loading cache app module: decoding module config: cache: json: unknown field \"Storer\""}
Reverting the cache-specific lines gets Caddy working again.
from cache-handler.
I missed the json configuration validation. I'll fix that in the next release and add some tests to ensure everything can reload without any issues. Sorry for that.
from cache-handler.
Thanks, I'd be happy to test again when the fix is in.
from cache-handler.
I tried with your configuration on the latest release (just use xcaddy build --with github.com/darkweak/souin/plugins/caddy
with the Caddyfile you given on top of this issue and it worked without any issues. Anyway I will find some time to write test cases about the configuration reload.
from cache-handler.
Can you try with xcaddy build --with github.com/darkweak/souin@f05fcc6808b9ba8cc61833b329b0b2b4697a2ad7 --with github.com/darkweak/souin/plugins/caddy@f05fcc6808b9ba8cc61833b329b0b2b4697a2ad7
@crummy?
from cache-handler.
That build is lots faster on the initial request, seems similar to with caching disabled. Thanks so much. I'll figure out my max-age header issue now and should be good!
from cache-handler.
Related Issues (20)
- How does stale work? HOT 5
- Cannot match current iteration key ETag HOT 9
- HEAD gives zero-sized Content-Length HOT 9
- Ability to force caching even if client sends no-cache HOT 2
- Caddy with cache-handler crashes frequently on virtuozzo/jelastic HOT 9
- big memory usage, memory leak? HOT 1
- Missing response on cached paths HOT 32
- Prevent caching based on response header HOT 12
- Maintenance and docs re: integrating upstream changes
- Last-Modified header and cache skip
- Cache a Redirect Response from reverse_proxy HOT 9
- Debug logging but without body content HOT 5
- Incomplete responses from reverse_proxy (context cancelled) are being cached
- http.handlers.cache Reused response from concurrent request with HOT 1
- How to remove listening port (5443) and protocol scheme (http/https) from the cache_key when it is not regular port while preserving the hostname? HOT 7
- Using cache-handler in production HOT 9
- http.handlers.cache Reused response from concurrent request with the key... HOT 2
- Support NutsDB In Memory mode HOT 1
- Impossible to open the Nuts DB.db.buildIndexes error: crc error HOT 5
- Redis with Large Cached Content Fails Resulting in Memory Leak HOT 2
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 cache-handler.