# Flushing cache

>Clearing temporary storage.

## Definition

Flushing cache refers to the process of clearing or purging the stored cache data in a website or web application. Cache is a mechanism that temporarily stores data or resources to improve performance by reducing server load and speeding up page loading times. When you flush the cache, you remove the stored cache data, forcing the system to fetch and regenerate the latest content from the server.

## Real Life Example

Imagine you have made updates to the content or design of your website, but the changes are not reflecting when you visit the site. By flushing the cache, you essentially clear the stored version of your website's pages, ensuring that the latest changes are fetched and displayed to both you and your website visitors.

## Why You Might Need/Use It

1. Content Updates: When you make changes to your website, such as updating text, images, or layout, the cache may still serve the previously stored version of the pages. By flushing the cache, you ensure that visitors see the most recent content and avoid displaying outdated information.
2. Design Changes: If you have made design modifications to your website, such as applying a new theme, modifying CSS styles, or adding customizations, flushing the cache ensures that the updated design elements are immediately visible to users. It prevents old cached versions of stylesheets or other assets from affecting the visual appearance of the website.
3. Plugin or Theme Updates: When you update plugins or themes in your website's CMS, the cache may still serve the older versions of the files, which can lead to compatibility issues or errors. Flushing the cache after updating plugins or themes ensures that the latest versions are loaded, minimizing potential conflicts and ensuring smooth functionality.
4. Troubleshooting: In some cases, when unexpected errors or issues occur on a website, flushing the cache can be a troubleshooting step. Cached data might be corrupted or incompatible with recent changes, causing conflicts or errors. By flushing the cache, you eliminate the possibility of cached data causing the problem and can identify if the issue lies elsewhere.
5. Performance Optimization: Clearing the cache periodically can help optimize website performance. As cache accumulates over time, it can consume server resources and slow down the delivery of fresh content. Flushing the cache removes old and unnecessary data, allowing the server to generate and deliver the latest content more efficiently.

## Commonly Confused For

1. Clearing Cookies: Clearing cache and clearing cookies are often related but serve different purposes. While clearing the cache removes cached data, clearing cookies deletes specific data stored on a user's device related to website preferences, logins, or session information. Clearing cookies does not directly affect cached data on the website's server.
2. Clearing Browser History: Clearing browser history refers to removing the record of websites visited from the browser's history list. While clearing browser history may also clear some cached data, it does not specifically target or remove the website's server-side cache. Clearing cache focuses on clearing cached data rather than browsing history records.
3. Deleting Temporary Files: Deleting temporary files typically refers to removing temporary files stored on a user's device by various applications, including web browsers. While deleting temporary files can free up storage space, it does not directly affect the website's cache stored on the server or in the user's browser.

## How To Flush Cache

### Flush Cache in Safari:

1. Open Safari browser on your device.
2. In the menu bar at the top, click on "Safari."
3. From the drop-down menu, select "Preferences."
4. In the Preferences window, go to the "Advanced" tab.
5. Check the box next to "Show Develop menu in menu bar" to enable the Develop menu.
6. Close the Preferences window.
7. In the menu bar, you should now see a "Develop" option. Click on it.
8. From the Develop menu, select "Empty Caches."
9. Safari will clear the cache, and you should see a confirmation message once it's done.

### Flush Cache in Chrome:

1. Launch the Chrome browser on your device.
2. Click on the three-dot menu icon located in the top-right corner.
3. From the drop-down menu, hover over "More tools."
4. In the expanded submenu, click on "Clear browsing data."
5. A pop-up window will appear. Make sure the "Cached images and files" option is selected.
6. You can adjust the time range to clear the cache for a specific period, or select "All time" to remove all cached data.
7. Click on the "Clear data" button.
8. Chrome will clear the cache, and a progress indicator will show the process. Once it's done, the indicator will disappear.

### Flush Cache in Edge:

1. Open the Microsoft Edge browser on your device.
2. Click on the three-dot menu icon located in the top-right corner.
3. From the drop-down menu, go to "Settings."
4. In the Settings pane, scroll down and click on "Privacy, search, and services."
5. Under the "Clear browsing data" section, click on the "Choose what to clear" button.
6. Make sure the "Cached images and files" option is checked.
7. You can select the time range for which you want to clear the cache, or choose "All time" to remove all cached data.
8. Click on the "Clear" button.
9. Edge will clear the cache, and a progress indicator will display the process. Once it's finished, the indicator will disappear.

Please note that the exact steps may vary slightly depending on the version of the browser you are using, but these instructions should give you a general idea of how to flush the cache in Safari, Chrome, and Edge.
