<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:s="leaf.plugin.script" xmlns:msg="leaf.application.features.msg" xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure>
        <!-- <s:server-script><![CDATA[
            function layout_cache_clear(root) {
                var cache = $cache("ResponseCache");
                var children = root.getChildren();
                if (!children.length) return;
                if (cache.getMap) {
                    var map = cache.getMap();
                    var keys = map.keySet().toArray();
                    for (var i = 0;i < children.length;i++) {
                        for (var j in keys) {
                            var key = keys[j];
                            if (key.indexOf(children[i].layout_code) != -1) {
                                map.remove(keys[j]);
                            }
                        }
                    }
                } else {
                    cache.clear()
                }
            }
            layout_cache_clear($ctx.parameter);
        ]]></s:server-script> -->
        <batch-apply sourcepath="/parameter">
            <msg:message-creator message="remove_layout" topic="application_foundation">
                <properties>
                    <msg:property key="layout_code" value="${@current_parameter/@layout_code}"/>
                </properties>
            </msg:message-creator>
        </batch-apply>
    </a:init-procedure>
    <a:service-output output="/parameter"/>
</a:service>
