Code Monkey home page Code Monkey logo

Comments (6)

darkweak avatar darkweak commented on June 3, 2024

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.

TNAJanssen avatar TNAJanssen commented on June 3, 2024

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.

TNAJanssen avatar TNAJanssen commented on June 3, 2024

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.

darkweak avatar darkweak commented on June 3, 2024

@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.

TNAJanssen avatar TNAJanssen commented on June 3, 2024

Yes, i will try it in a couple of hours! Thanks

from souin.

TNAJanssen avatar TNAJanssen commented on June 3, 2024

After purging, it indeed does reload from the server! Good work!

from souin.

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.