Modify

Opened 3 years ago

#14046 new enhancement

Ability to disable cache

Reported by: tn5583730@… Owned by: Ryan J Ollos
Priority: normal Component: PlantUmlMacro
Severity: normal Keywords:
Cc: Trac Release: 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.

Attachments (0)

Change History (0)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Ryan J Ollos.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.