Is your feature request related to a problem? Please describe.
I like modular architecture of document, so I make PlantUML file outside markdown, and import the file from the obsidian-plantuml codeblock inside markdown (using !include DIAGRAM.puml!DIAGRAM_ID). The problem is that if I make changes to the PlantUML file, the changes are not reflected in the diagram output displayed in markdown. I suspect it is because the obsidian-plantuml codeblock caches the result and does not clean it up as long as the codeblock doesn't change (i.e., the line !include DIAGRAM.puml!DIAGRAM_ID inside PlantUML codeblock doesn't change).
Describe the solution you'd like
I want obsidian-plantuml to either
automatically refresh/cleanup the PlantUML codeblock if it contains !include, or
equip a function to manually refresh/cleanup cache.
Describe alternatives you've considered
So far, as a workaround, I add some comment to the codeblock so that the obsidian-plantuml recognizes the codeblock has changed.
I also thought about removing obsidian cache in ~/.config/obsidian/Cache/Cache_Data/, but on the second thought I decided not to, because it may remove other caches that are probably helpful for obsidian performance. Also, I thought just selectively removing obsidian-plantuml's cache would be more elegant solution. (I would've modify the code myself only if I knew typescript!)
Is your feature request related to a problem? Please describe. I like modular architecture of document, so I make PlantUML file outside markdown, and import the file from the obsidian-plantuml codeblock inside markdown (using
!include DIAGRAM.puml!DIAGRAM_ID
). The problem is that if I make changes to the PlantUML file, the changes are not reflected in the diagram output displayed in markdown. I suspect it is because the obsidian-plantuml codeblock caches the result and does not clean it up as long as the codeblock doesn't change (i.e., the line!include DIAGRAM.puml!DIAGRAM_ID
inside PlantUML codeblock doesn't change).Describe the solution you'd like I want obsidian-plantuml to either
!include
, orI suspect it has something to do with
cleanupCache
function inmain.ts
: https://github.com/joethei/obsidian-plantuml/blob/2463d93539bcf207d7e31e0bf96b0ddde644d203/src/main.ts#L164Describe alternatives you've considered So far, as a workaround, I add some comment to the codeblock so that the obsidian-plantuml recognizes the codeblock has changed.
I also thought about removing obsidian cache in
~/.config/obsidian/Cache/Cache_Data/
, but on the second thought I decided not to, because it may remove other caches that are probably helpful for obsidian performance. Also, I thought just selectively removing obsidian-plantuml's cache would be more elegant solution. (I would've modify the code myself only if I knew typescript!)