Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(pgs): use soiun in-app for http caching #175

Closed
wants to merge 2 commits into from
Closed

Conversation

neurosnap
Copy link
Member

This gives us more control over the underlying cache and lets us build our own system for purging our cache.

@mac-chaffee
Copy link
Contributor

Very clever I must say! I kicked the tires a little bit.

We'd either need to expose Souin's internal API on pgs or wrap its methods for purging by surrogate key with pgs' own API, then be able to call that API from pgs-ssh.

There's definite risks, like probably being the only person on the planet using Souin in this way, but seems promising.

@neurosnap
Copy link
Member Author

Overall I think this is going to be the winning approach for a couple of reasons:

  • Souin is written in Go with a supported API for direct integration with our apps
  • Easy to test and develop since it is inside our app
  • We have direct access to the caching layer
  • We can use our own systems for managing cache clearing API instead of relying on Souin's http api

I'm working on the cache clearing API and will let you review it when it's ready. Thanks for all your help!

This gives us more control over the underlying cache and lets us build
our own system for purging our cache.
@neurosnap
Copy link
Member Author

This has been deployed. I'll be monitoring its status but custom domains should be properly cached now

@neurosnap neurosnap closed this Dec 15, 2024
@neurosnap neurosnap deleted the souin-in-app branch December 15, 2024 17:51
@mac-chaffee
Copy link
Contributor

Nice work using pipe for cache clearing! Glad we could settle on a solution that you'd be comfortable with!

Now I can rest easy knowing most visitors to my site are only waiting on latency and an in-memory lookup 😎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants