Coder Social home page Coder Social logo

Comments (7)

darkweak avatar darkweak commented on June 1, 2024

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.

crummy avatar crummy commented on June 1, 2024

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.

darkweak avatar darkweak commented on June 1, 2024

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.

crummy avatar crummy commented on June 1, 2024

Thanks, I'd be happy to test again when the fix is in.

from cache-handler.

darkweak avatar darkweak commented on June 1, 2024

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.

darkweak avatar darkweak commented on June 1, 2024

Can you try with xcaddy build --with github.com/darkweak/souin@f05fcc6808b9ba8cc61833b329b0b2b4697a2ad7 --with github.com/darkweak/souin/plugins/caddy@f05fcc6808b9ba8cc61833b329b0b2b4697a2ad7 @crummy?

from cache-handler.

crummy avatar crummy commented on June 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.