@@ -0,0 +1,999 @@
+package org.jcodegen.html.cache;%0A%0Aimport org.jcodegen.html.Tag;%0A%0Aimport java.util.concurrent.ExecutorService;%0A%0Apublic abstract class TagTreeFragmentCache %7B%0A%0A    private final ExecutorService executorService;%0A%0A    private String cachedData;%0A%0A    protected TagTreeFragmentCache(ExecutorService executorService) %7B%0A        this.executorService = executorService;%0A    %7D%0A%0A    public boolean dataAvailable() %7B%0A        return cachedData != null;%0A    %7D%0A%0A    public void refreshData() %7B%0A        executorService.execute(new Runnable() %7B%0A            @Override%0A            public void run() %7B%0A                if (cachedData == null)%0A                    cachedData = getContainerTag().toString();%0A            %7D%0A        %7D);%0A    %7D%0A%0A    public String getData() %7B%0A        if (dataAvailable())%0A            return cachedData;%0A%0A        refreshData();%0A        return getPlaceHolderContainerTag().toString();%0A    %7D%0A%0A    protected abstract Tag getContainerTag();%0A%0A    protected abstract Tag getPlaceHolderContainerTag();%0A%7D%0A

Create cache class to store/process heavy computation Tag trees