clear mondrian cache for a date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<action-sequence> | |
<title>Prime Mondrian Cache</title> | |
<version>1</version> | |
<logging-level>DEBUG</logging-level> | |
<documentation> | |
<author /> | |
<description>An example of priming Mondrian Cache</description> | |
<help /> | |
<result-type /> | |
<icon /> | |
</documentation> | |
<inputs /> | |
<outputs /> | |
<resources> | |
<catalog> | |
<url> | |
<location>solution:/Affiliate_Tracking/schema.xml</location> | |
<mime-type>text/xml</mime-type> | |
</url> | |
</catalog> | |
</resources> | |
<actions> | |
<action-definition> | |
<component-name>MDXLookupRule</component-name> | |
<action-type>OLAP Connection</action-type> | |
<action-resources> | |
<catalog type="resource" /> | |
</action-resources> | |
<action-outputs> | |
<prepared_component type="mdx-connection" mapping="shared_olap_connection" /> | |
</action-outputs> | |
<component-definition> | |
<jndi><![CDATA[SampleData]]></jndi> | |
<location><![CDATA[mondrian]]></location> | |
</component-definition> | |
</action-definition> | |
<action-definition> | |
<component-name>JavascriptRule</component-name> | |
<action-type>JavaScript To Clear portions of the cache</action-type> | |
<action-inputs /> | |
<action-outputs /> | |
<component-definition> | |
<script><![CDATA[function cacheControlImpl() { | |
var conn = shared_olap_connection.shareConnection().getConnection(); | |
var schema = conn.getSchema(); | |
var cube = schema.lookupCube("INTERNAL_REPORT", true); | |
var schemaReader = cube.getSchemaReader(null); | |
var cacheControl = conn.getCacheControl(null); | |
var member = schemaReader.getMemberByUniqueName(Packages.mondrian.olap.Id.Segment.toList("DATE_PERIODS", "DAY_OF_MONTH", "2013-10-18"), true); | |
var memberRegion = cacheControl.createMemberRegion(member, true); | |
var measuresRegion = cacheControl.createMeasuresRegion(cube); | |
var joinRegion = cacheControl.createCrossjoinRegion(measuresRegion, memberRegion); | |
cacheControl.flush(joinRegion); | |
} | |
cacheControlImpl();]]></script> | |
</component-definition> | |
</action-definition> | |
</actions> | |
</action-sequence> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Response :