Is your Mac behaving strangely or running slower than normal? Maybe one or more of your apps are running slow or "hanging up" at times. Are you concerned with your private information being available for companies to use without your permission? These are all good reasons to learn to clear the cache on your Mac.
In general, a Mac is very good at taking care of itself. Apple has built an incredible computer and operating system (MacOS) that is both efficient and effective at general maintenance. Sometimes you might find that you need to do a little extra work to make sure your desktop Mac or MacBook is running at peak efficiency.
What is Cache?
Cache is data that your computer stores in memory to speed up certain processes. More specifically, it is a small amount of data held in memory that is referred back to in order to speed up processes that have been used recently or are used often.
Cached data is generally stored temporarily in memory that is local to the cache client and separate from the main hard drive. Cache is commonly used by the central processing unit (CPU), applications, web browsers and operating system. Physically, it is stored on a chip on the system board although sometimes disk memory is used as well.
There are three different kinds of cache:
System Cache is stored data used by the Operating System (MacOS) to speed up processes.
The system cache can include things like cached web pages, frequently accessed system libraries, and other data that applications use to operate efficiently. By keeping this data cached in memory, the system can quickly retrieve it when needed, rather than having to re-read it from the slower storage devices like the hard drive.
Over time, the system cache can grow in size, which can sometimes cause performance issues. Clearing the cache can help improve performance by freeing up memory and disk space, but it can also cause a temporary slowdown while the cache is rebuilt.
It's worth noting that macOS has built-in mechanisms to manage the system cache, so in most cases, you don't need to manually clear the cache yourself. However, if you're experiencing performance issues, clearing the cache can sometimes help.
Browser Cache Browser cache refers to a feature in web browsers that stores copies of web pages, images, and other resources that a user has visited on a website. The browser cache is designed to speed up page loading times and reduce the amount of data that needs to be downloaded each time a user visits a website.
However, if the cached resources become outdated or corrupted, it can cause issues such as missing images, broken layouts, or outdated information. In these cases, clearing the browser cache can help resolve the issues by forcing the browser to download new copies of the resources from the server.
It's also worth noting that the browser cache can be a privacy concern, as it can store sensitive information such as login credentials or personal data. Most modern browsers have settings to clear the cache automatically or allow you to manually clear the cache when needed.
User App Cache
User App Cache consists of the small files your applications create on your computer while you are using them. These cached files speed things up and remember where you were when you last used that application. These files generally take up a much larger amount of space than system cache files.
User app cache refers to temporary data that is stored by applications on a user's device to help improve performance and reduce the need to re-download data. This cache can include things like frequently accessed images, user preferences, and app settings.
Many applications use caching to speed up the user experience and reduce the amount of data that needs to be downloaded from a server. For example, a social media app may cache images and videos that a user has already viewed, so that the next time the user opens the app, the content can be displayed more quickly.
Over time, the user app cache can grow in size, which can sometimes cause performance issues. Clearing the cache can help free up storage space and potentially improve performance, but it may also cause a temporary slowdown as the app rebuilds its cache.
Many apps have built-in mechanisms to manage their own caches, so in most cases, you don't need to manually clear the cache yourself. However, if you're experiencing issues with an app or are running low on storage space, clearing the cache may help.
How Does Cache Work?
Lets take a quick look at how each of the cache types on your Mac work.
When the cache client in your OS tries to access data, it will first check the current cache. If it finds data there that pertains to the current process, it will pull that data and use it. This is known as a cache hit.
If there is no data pertaining to the requested process found in the cache (known as a cache miss), the cache client will create that data in the cache.
In the case of a web browser, caching is used to improve performance by storing data that will improve performance of websites that are frequently visited. This cached data is stored on your computers storage media - typically your hard drive. Cookies and search history are things you will frequently find cached in all of the web browsers you use (Safari, Firefox, Google Chrome, Brave).
As mentioned earlier, this is generally a much larger storage of data than system cache.
Why Empty Your Cache?
Clearing the different types of cache on your desktop Mac or MacBook will clear up valuable space on your hard drive. Remember, all of the data in your browser cache is downloaded from the internet so you do not always know what is being stored and how long it has been there. Sometimes this data can cause issues such as the following:
- Application performance issues and crashing - sometimes cahced data can affect the performance of your computer and affect your programs, especially if the data is corrupted.
- Personal information - the cache holds personal information that you might not want shared any longer with web sites you are visiting.
- Outdated website information - this can actually cause rendering issues with websites you visit if the information is out of date and the site has been updated with newer data or UI improvements.
How to Clear History in your Browser
To clear the history of websites you have visited in your browser, open the browser you want to clear the history for. You will have to perform this for each browser you use since it is unique to each.
Sometimes you will only want to clear your history in your browser. This is how to clear History in Safari:
- Open your browser
- Click History in your top menu bar
- Click Clear History... at the bottom of the menu
4. A window will pop up giving you three options for clearing your History. Here you can choose from four options. Clearing all history will clear your entire history of visited sites. Keep in mind, this will NOT clear all of your cache. It will only clear the list of websites you have visited for a given amount of time.
How to Clear Browser Cache in Safari
Different and more comprehensive than clearing the History of your browser is clearing the browser cache.
- Open Safari browser
- Click Safari --> Settings
- Click the Privacy tab
4. Click Manage Website Data...
5. At this point you can scroll down the list and Remove data from the websites you choose, or you can just choose to Remove All.
If you choose to Remove All and clear your entire browser cache, you will be presented with the following warning. Do not worry about deleting this data as it will be refilled as you browse the web in the future.
How to Clear Application Cache on your Mac or MacBook
Here is how to clear your Application Cache on your Mac.
- Open Finder --> Go
- Scroll down and click Go to Folder...
3. Type the following: ~/Library/Caches --> This will bring up the following options:
4. Click Caches
5. You will be presented with a list of folders where caches are stored for each application. Your best option here is to click on a folder and delete only the contents of the folders you want to remove.