Skip to content

Clear cache

The cache-clearing feature provides administrators with a quick way to clear various types of caches related to the application. This can be useful for troubleshooting, testing, or resolving issues related to stale data. The command can be executed directly in the browser’s console and includes the following actions:

  1. Redis Cache Clearing: Clears the Redis cache used by the server to store frequently accessed data.
  2. Azure Function Cache Clearing: Clears any cached data in Azure Functions related to the application.
  3. Local and Session Storage Clearing (Client-Side): Removes local storage data in the client’s browser, excluding authentication data.

Usage

To clear the cache, open the browser's console and run the following command:

window.clearCache();

How to Open the Dev Tools Console

To run the cache-clearing command, you first need to open the browser’s Developer Tools console. Here are the steps for different browsers:

Google Chrome

  1. Open Chrome.
  2. Press Ctrl + Shift + J (Windows/Linux) or Cmd + Option + J (Mac) to directly open the Console tab.
  3. Alternatively, you can right-click on the page, select Inspect or Inspect Element, and then click on the Console tab.

Mozilla Firefox

  1. Open Firefox.
  2. Press Ctrl + Shift + K (Windows/Linux) or Cmd + Option + K (Mac) to open the Console.
  3. Or, right-click on the page, select Inspect Element, and navigate to the Console tab.

Microsoft Edge

  1. Open Edge.
  2. Press Ctrl + Shift + J (Windows/Linux) or Cmd + Option + J (Mac).
  3. Alternatively, right-click on the page, choose Inspect, then select the Console tab.

Safari (Mac)

  1. Open Safari.
  2. Go to Safari > Preferences in the menu bar, then select the Advanced tab.
  3. Check Show Develop menu in menu bar if not already enabled.
  4. Press Cmd + Option + C to open the Console, or go to Develop > Show JavaScript Console in the menu.

Once the console is open, you can enter the cache-clearing command:

window.clearCache();

This will clear the specified caches, and you should see the confirmation message in the console.

image.png


Note: This command should only be used by authorized administrators due to its impact on app performance and user experience.