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

Caching kroki svgs #2020

Closed
regevbr opened this issue Jun 8, 2020 · 5 comments · Fixed by #2047
Closed

Caching kroki svgs #2020

regevbr opened this issue Jun 8, 2020 · 5 comments · Fixed by #2047
Assignees

Comments

@regevbr
Copy link
Contributor

regevbr commented Jun 8, 2020

When using kroki to generate umls in markdown, every page loads calls the kroki api which is redundant and time consuming.
@NGPixel do you think that inlining the resulting svg on render will give better performance?
If the answer is yes, I'm willing to create a pr!

regevbr added a commit to PruvoNet/wiki that referenced this issue Jun 11, 2020
regevbr added a commit to PruvoNet/wiki that referenced this issue Jun 11, 2020
regevbr added a commit to PruvoNet/wiki that referenced this issue Jun 13, 2020
regevbr added a commit to PruvoNet/wiki that referenced this issue Jun 13, 2020
regevbr added a commit to PruvoNet/wiki that referenced this issue Jun 13, 2020
regevbr added a commit to PruvoNet/wiki that referenced this issue Jun 13, 2020
regevbr added a commit to PruvoNet/wiki that referenced this issue Jun 18, 2020
regevbr added a commit to PruvoNet/wiki that referenced this issue Jun 18, 2020
regevbr added a commit to PruvoNet/wiki that referenced this issue Jun 18, 2020
NGPixel pushed a commit that referenced this issue Jun 18, 2020
@twoi
Copy link

twoi commented Jul 7, 2021

@regevbr

When using kroki to generate umls in markdown, every page loads calls the kroki api which is redundant and time consuming.

But is this really true? When checking plantuml, I found it sets these headers:

Cache-Control: public, max-age=432000
Expires: [ 5 days from now ]

And my browser respects them, and consults the cache - so the problem you are describing does not exist as far as I can tell.

@twoi
Copy link

twoi commented Jul 7, 2021

@regevbr

Your feature is useful for me for a different reason however: When plantuml / kroki rendering is requested by the server, rather than the client, I don't need to expose my plantuml / kroki servers to the internet. That way I don't need to figure out how to do authentication for those.

@regevbr
Copy link
Contributor Author

regevbr commented Jul 7, 2021

@twoi you are correct when you look at it from a single client point of view, but there is no need to slow down the first page view for every client who access the page and to create that load on the rendering service...
About authentication, indeed that is also an added bonus

@twoi
Copy link

twoi commented Jul 7, 2021

The only problem is that in contrast to rendering, while editing a plantuml diagram on a page, a hard-coded plantuml server will be used, leaking potentially private data to https://plantuml.requarks.io (perhaps that was the whole point of wiki.js ;-)

Described here: #3583

So once this is fixed and the configured plantuml server gets used for editing as well (in that case presumably called from the browser), I would need to expose the server on the internet...

@regevbr
Copy link
Contributor Author

regevbr commented Jul 7, 2021

Seems like you need to express your valid concerns on your mentioned discussion wo they can address it in the pr there

jionggyu pushed a commit to jionggyu/wiki-2.5.302-patch that referenced this issue Jul 9, 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 a pull request may close this issue.

3 participants