﻿ticket	summary	type	release	owner	status	created	modified	_description	_reporter
14046	Ability to disable cache	enhancement	1.2	Ryan J Ollos	new	2021-08-20T14:40:54+02:00	2021-08-20T14:40:54+02:00	"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"", 
 3. 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.


"	tn5583730@…
14082	Can not render diagrams besides  @startuml	defect	1.2	Ryan J Ollos	accepted	2021-11-17T16:15:13+01:00	2021-11-17T18:31:41+01:00	"All kinds of diagrams besides `@startuml` (like `@startjson` etc.) supported by `plantuml` cause errors. Looks like it is artifact  of `WikiMacro` calls protection.

I believe that following minimal intervention may help:
{{{
--- plantuml/macro.py   2018-01-28 18:38:22.000000000 +0700
+++ plantuml/macro.py   2021-11-17 21:51:58.502779312 +0700
@@ -98,7 +98,7 @@
 
         path = None
         if 'path' not in args:  # Could be WikiProcessor or WikiMacro call
-            if content.strip().startswith(""@startuml""):
+            if content.strip().startswith(""@start""):
                 path = None
             else:
                 path = content
}}}
"	idle@…
12673	Cannot split diagrams	defect		Ryan J Ollos	accepted	2016-02-17T12:03:40+01:00	2021-03-22T11:09:12+01:00	"using plant uml  ""newpage"" to split multiple diagrams across a wiki page, is not working.
using this code:
{{{
@startuml

Alice -> Bob : message 1
Alice -> Bob : message 2

newpage

Alice -> Bob : message 3
Alice -> Bob : message 4

newpage A title for the\nlast page

Alice -> Bob : message 5
Alice -> Bob : message 6
@enduml
}}}"	tadupreez@…
