Opened 11 months ago

Ability to disable cache

Reported by: Owned by: tn5583730@… Ryan J Ollos normal PlantUmlMacro normal 1.2

Description

The plugin is making use of a cache for the generated diagrams.

This however does not work too well when actually one wants certain diagrams to always be regenerated on request.

E.g. a Gantt diagram is written to indicate "today"'s date. Using the cache, this date is always the date of the cached version. I assume there may be other such dynamic elements in other types of PlantUML diagrams.

Also we wanted to use the macro to show diagrams located in source repositories. Again, if we commit new versions into the source repository, Trac still just shows the cached version.

The following two snippets show these scenarios:

@startuml

@startgantt
project starts on 2021-08-09
today is colored in #0AF
projectscale daily
[Watch Breaking Bad on Netflix] lasts 2 weeks
@endgannt
@enduml


[[PlantUML(project/plans/plantuml/some.puml)]]


Ideas

Have flags/options to be

1. Disabling the cache altogether for the plugin
2. Disabling the cache for a single diagram,

Regarding the "use diagram from repository",

1. Making the cache check the .png metadata

Would it make sense in general to make the cache make use of the fact that PlantUML encodes the source diagram into the generated .png?

This can be retrieved by

java -jar plantuml.jar -metadata cached-version.png

The cache mechanism could use this to compare against the source plantuml diagram to be rendered, to see if the cache needs to be updated.

Modify Ticket

Change Properties