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

Improve certstorage example #456

Closed
wants to merge 1 commit into from
Closed

Conversation

tetafro
Copy link

@tetafro tetafro commented Dec 4, 2021

I've added more info and one more example to CertStore example.

I actually just looked through these discussions and copied useful information, so all credits to people from there:

@ErikPelli
Copy link
Collaborator

Having a mutx for every single host looks like an anti-pattern to me.
This will also cause memory leaks if there are a lot of different hosts, since the older one are never cleaned uo.

@tetafro
Copy link
Author

tetafro commented Dec 22, 2024

I don't really remember my thinking from 3 years ago, but looks like it's just the most straight-forward example I could come up with.
This definitely can be improved in real life, using some caching with eviction policy instead of a map.

@ErikPelli
Copy link
Collaborator

Uhm ok, do you think it should still be merged or the current simple example is enough as a simple example for someone that never used this library? (Do you still use it?)

@tetafro
Copy link
Author

tetafro commented Dec 25, 2024

Wait, I just noticed that you did pretty much the same in the current example. Why are we discussing this PR then? Let's just close it.

@tetafro tetafro closed this Dec 25, 2024
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