How can I clean cached include files on plantuml-server?

0 votes
asked May 23, 2021 in Question / help by kirchsth (2,900 points)
retagged May 25, 2021 by kirchsth

I changed my C4.puml implementation but if I open the diagram in PlantUML-Server it still displays the old diagram with the old/cached C4.puml file. How can I clean the cache on the PlantUML-Server? (the cache is older >1 day!)
Thank you and best regards

e.g. in following [cached] png version the legend is violet

But if I use the svg version of the same link it displays the correct khaki colors in the diagram (it was never used with old version).

commented May 24, 2021 by kirchsth (2,900 points)
commented May 25, 2021 by kirchsth (2,900 points)
edited May 28, 2021 by kirchsth

I checked the source, could it be that there is an automatic cache of 5 days if the url>35 character (independet of the referenced !include files),
@plantuml: can this be the problem?

Thank you and best regards


        if (StringUtils.isDiagramCacheable(uml)) {


    public static boolean isDiagramCacheable(String uml) {
        if (uml.length() < 35) {
            return false;
        return true;


  public void addHeaderForCache(HttpServerResponse response, String data) {
    long today = System.currentTimeMillis();
    final int maxAge = 3600 * 24 * 5;
    // Add http headers to force the browser to cache the image
    response.putHeader(HttpHeaders.EXPIRES, String.valueOf(today + 1000L * maxAge));

commented May 28, 2021 by kirchsth (2,900 points)
Cache expired after 5 days, correct diagram is displayed

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.