-
Notifications
You must be signed in to change notification settings - Fork 23
Add caching for Kroki diagrams #1601
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
base: main
Are you sure you want to change the base?
Conversation
🔍 Preview links for changed docs |
@Mpdreamz @reakaleek An experiment. For reasons I don't fully understand, the local cache isn't used by the preview in this PR, but it does work locally. |
src/Elastic.Markdown/Myst/Directives/Diagram/DiagramRegistry.cs
Outdated
Show resolved
Hide resolved
src/Elastic.Markdown/Myst/Directives/Diagram/DiagramRegistry.cs
Outdated
Show resolved
Hide resolved
src/Elastic.Markdown/Myst/Directives/Diagram/DiagramHttpClient.cs
Outdated
Show resolved
Hide resolved
src/Elastic.Markdown/Myst/Directives/Diagram/DiagramRegistry.cs
Outdated
Show resolved
Hide resolved
src/Elastic.Markdown/Myst/Directives/Diagram/DiagramRegistry.cs
Outdated
Show resolved
Hide resolved
src/Elastic.Markdown/Myst/Directives/Diagram/DiagramRegistry.cs
Outdated
Show resolved
Hide resolved
src/Elastic.Markdown/Myst/Directives/Diagram/DiagramRegistry.cs
Outdated
Show resolved
Hide resolved
@Mpdreamz Thanks! Most changes applied I'd say. Still wonder why the preview doesn't use the cached SVGs though. I guess the proper docs build will? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few more review comments
Will dig into it at some point this week! |
…urce and output folder though
This continues #1599
Overview
This PR implements a diagram caching system to improve performance and reliability for documentation builds. The system provides local SVG caching with fallback to Kroki URLs. Hopefully I steered Claude correctly on this one...
Features
{markdown-file}-diagram-{type}-{hash}.svg
HttpClient
singleton prevents socket exhaustion