ondrajz / go-callvis

Visualize call graph of a Go program using Graphviz
https://ofabry.github.io/go-callvis
MIT License
5.94k stars 409 forks source link

Add caching #71

Closed adieUkid closed 4 years ago

adieUkid commented 4 years ago

I found that when using the go-callvis for some large projects (such as kurbernetes), each package takes a long time to render, and these tasks cannot be reused. So i add caching function to avoid some unnecessary re-renderings.

ondrajz commented 4 years ago

Hey, thank you for your contribution!

I have one question about the cache expiration - perhaps for those cases when someone uses this during development and code changes. Perhaps some URL query to force no-cache so they can refresh right after some code changes.

adieUkid commented 4 years ago

You are right. I added it. For me, the caching function is mainly useful when browsing some larger projects, saving my time without manually copying the generated files