Clear Jira or Groovy Caches

Use the Clear Groovy or Jira Internal Caches built-in script to manually clear caches if automated clearing fails (Groovy), or changes have been made in the database (Jira). Triggering a clear cache event, this built-in script clears all caches responding to the event.

  • Clear Groovy Caches - Manually clear groovy ClassLoader caches if they fail to clear automatically. Classes should be reloaded whenever a script is modified. However, dependant classes can fail to reload. For example, if you have a custom class file (ClassA) in your script roots and another Groovy script imports that file, modifications to ClassA may not show up until you modify the script that imports them or clear the Groovy cache with this script.

  • Clear Jira Internal Caches - Clear Jira internal caches after changing something in the backend such as modifying a database table. Clearing the internal cache is safe for use on production environments, as the cache is cleared during enabling/disabling of plugins.

    1. From ScriptRunner, navigate to Built-in Scripts→Clear Jira or Groovy Caches.

    2. Select the cache to be cleared under Which Cache?.

    3. Click Run to clear the selected cache.

      Expect a delay in screen refresh as classes are recompiled when clearing caches.