Dear visitor, despite the COVID-19 outbreak, our team continues operating at full speed.

Also, here is the form where you can apply for a special discount and we will contact you with possible options. Stay safe and continue achieving your business goals.

Fill the form
Get Free Trial
Get Free Trial

Clear Mondrian cache

Answered
MC asked on January 30, 2020

Hi Flexmonster Team,
I have flexmonster accelerator running on Wildfly (as described here). Accelerator cache is disabled.
I want to integrate a button in my WebApp so that one user can clear the Mondrian cache. I have read the documentation on how to clear the cache and I have tried with the following javascript code

var url = "./flexmonster/ClearCache/";
var xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", url, false );
xmlHttp.send( null );
return xmlHttp.responseText;

But I’m getting the following error message: 
ERROR. Operation is not allowed. Request was performed from the remote host.
 
Thx for your help.

1 answer

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster January 31, 2020

Hello,
 
Thank you for posting your question.
 
Please note that by default the ClearCache only works when triggered on the host machine. In other words, all requests to the ClearCache outside of the localhost will be refused.
 
In case you want every user to have the right to clear the cache, we would suggest setting up a proxy between the user and your server which would redirect the user’s request to trigger the ClearCache on the server with the data.
 
Please let us know if this helps.
 
Best regards,
Mykhailo

Please login or Register to Submit Answer