Web API call -info_cache_enhanced.jsp

Sofia Rabin shared this question 3 years ago
Answered

Hi,

We want to create automation process that let the users option to run report with higher row limit than today.

basically we will update all the views in yellowfin with higher row limit, and we will update by SQL script all the reports except the specific ones with lower row limit.

After this update we need to run clear cache by click on clear this way:

/dcba41b6b7754e947813d89afa865953

Is there any option to run the clear cache by web api call? or some different command that we can add to automated process?


Thanks,

Sofia

Replies (12)

photo
1

Hi Sofia,

Yes, you can. I'll get a JSP file for you, which you can curl in cmd prompt and have it clear the cache.

Kind regards,

Chris

photo
1

Hi Sofia,

This page should work. I created it by taking the clear command from the info_cache_enhanced.jsp and copying it out to a fresh document, if you access the page, it will clear the cache.

Hope that helps.

Kind regards,

Chris

photo
1

Thanks.

We have few environments, I tried to check this code and couldn't find on what environment it's going to affect.

Also, which "clear" is it? we have many options as "Report Data Cache", "Report Definition Cache"... etc..


Thanks,

Sofia

photo
1

Hi,

I think i understood how it work.

If i want clear only reports cache it means that only this part will be executed:

/38e0178b1aff9ef24cd374ed4a75c7c8

but i see that this script have many commands at the beginning and in the end.

Can you please create some template for me that clear specific cache (at this point "Report Data Cache" will be great)?


Thanks,

Sofia

photo
1

Hi Sofia,

Apologies, it looks like I attached the wrong file for you, it should have been the one now attached, which does only clear the report data cache.

You need to put this in \Yellowfin\appserver\webapps\ROOT

It'll clear the cache for all orgs on the instance of Yellowfin, you can't specify an individual one.

Kind regards,

Chris

photo
1

Hi,

Thanks, it seems to work.

Is there any way to create separate jsp for each clear option?

We are going to create a process that will run every few min, for this process we need to clear only reports caches.


Thanks,

Sofia

photo
1

Hi Sofia,

Yes you can create separate JSPs for each option, just copy out the relevant command and replace the ReportDataCache clear command from the JSP below. You can see them starting at line 26 in info_cache_enhanced.jsp.

Kind regards,

Chris

photo
1

Hi,

Is there any chance the jsp file don't work with 9.3 version? or maybe we need different function for this scenario:

We have many reports with csv entry filter, when users import a lot of values and want export the report to excel they get an error, so we want remove the legend of the filter,

I updated the table ReportFormat this way:

(#ReportsWithCSV is temp table with all the reports that appear with FormatTypeCode = 'ALLOWCSVENTRY' AND FormatCode = 'True')

--update dbo.ReportFormat

--SET FormatCode='FALSE'

--FROM dbo.ReportFormat

--INNER JOIN #ReportsWithCSV

--ON ReportFormat.ReportId = #ReportsWithCSV.ReportId

--AND ReportFormat.EntityId = #ReportsWithCSV.EntityId

--WHERE FormatTypeCode = 'DISPLAYFILTER'

--AND FormatCode = 'True'


Which cache should I clear to apply this update on yellowfin app?

Thanks,

Sofia

photo
1

Hi Sofia,

It could be the ReportDefinitionCache that holds this information, but did you make the change to the database whilst Yellowfin was shut down? Was the change not apparent when restarting Yellowfin?

Kind regards,

Chris

photo
1

Hi,

yes it work with ReportDefinitionCache.

I tried to use now the automate file but i get the attached error...

i changed the jsp to use this command:

/bbcef00160304fcb7fe2a98ce2f2a284


and got error so i tried to add also this part.

/2a9ea6073cec1653d63d0ca09ddd0edb


can you please create for me example for jsp the clear automatically only ReportDefinitionCache?


Thanks!

photo
1

Hi Sofia,

Going from the original JSP file, it looks like the command you're looking for is ReportDefinitionCache.getInstance().clear(); rather than ReportDefinitionCache.Instance().clear();

Hopefully that helps with creating a working file!

Kind regards,

Chris

photo
1

Hi Sofia,


I hope things are going well over there.


Just wanted to let you know I'll be closing this request due to inactivity. However, if you ever wanted to re-visit this or have anything else I can help you with, please let me know.


Regards,

Chris

Leave a Comment
 
Attach a file