how to clear the cache in scoped application using script?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-11-2020 01:10 AM
hi Developers I am able to clear the cache via script using ga.cacheFlush(); in global scope but same cannot use in scoped Application
Can anyone suggest any alternative for clearing cache via code in scoped Application
thanks in advance
Regards
harsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-11-2020 01:14 AM
Hi Harsha,
try this
Running gs.cacheFlush(); in the Scripts - Background module
Regards
Ankur
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-11-2020 01:28 AM
Hi Ankur
it is showing that cacheFlush() function is not allowed in scoped application,while we run that in background scripts.
Regards
Harsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-11-2020 02:05 AM
Hi Harsha,
you can try creating a script include in global scope which is accessible from All application scope and then call that script include function
But I would like to understand what is the requirement to clear the cache using script.
Haven't come across that much earlier.
Regards
Ankur
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-11-2020 01:40 AM
Hello,
Have a look on this,
Steps to determine the cause of a cache flush
If answer is helpful please mark correct or helpful!
Thanks,
Pratiksha