In simple terms, the cache is where information is stored on your computer that allows things to load faster than if you have to download it from the server. In more detail:
In computer engineering, a cache (pronounced /ˈkæʃ/ kash in US/UK and /keɪʃ/ kaysh in Aust/NZ) is a component that transparently stores data so that future requests for that data can be served faster. The data that is stored within a cache might be values that have been computed earlier or duplicates of original values that are stored elsewhere. If requested data is contained in the cache (cache hit), this request can be served by simply reading the cache, which is comparatively faster. Otherwise (cache miss), the data has to be recomputed or fetched from its original storage location, which is comparatively slower. Hence, the more requests can be served from the cache the faster the overall system performance is. 1)
It is common knowledge that clearing cache can help with a multitude of issues. Having said that we do not recommend clearing cache unless you are having an issue that cannot be solved by other means.
We get asked a lot about what to set cache size to; the simple answer is to set it to the maximum possible in the viewer, as long as you have room on your hard drive. In Firestorm, the cache size can be increased to 9,984 MB. We do have a way to allow you to have a larger cache, but it requires extra hardware and software. If you are interested please see Squid Proxy Cache
Be picky about why and when you clear your cache. Clearing cache doesn't fix everything. In fact, it doesn't fix nearly as many problems as many people seem to think. And doing it when it's unnecessary has its drawbacks, including slower initial rez times and excess bandwidth being pulled, which can create sim lag. “Clear your cache” is something we'll recommend ONLY if the problem appears to be cache-related: that is, pertaining to textures or, once in a while, inventory. A full cache is almost always better than an empty one. Here is a basic “DO” list:
Don't clear cache as a matter of routine maintenance. If there isn't something actually wrong with your cache, then this does nothing beneficial.
Don't clear it for problems unrelated to the cache. It won't help for:
There are some exceptions (e.g., crashes related to textures), but in many cases, other causes are more likely, and clearing cache doesn't have to be the first measure. The list above is by no means exhaustive; its purpose is to provide an idea of how many common issues are unrelated (or only occasionally related) to cache.
Note that often, only part of your cache needs to be cleared. While you can clear your full cache by clicking the button in Preferences, it is not hard to perform the needed part of the cache clear manually. You can find your cache folder by going to Preferences and then Network & Files → Directories. Click the “Open” button alongside the path to your cache files location. In there you'll see some files ending with .inv.gz – these are your inventory cache files – and a folder containing your texture cache. More information is here for Firestorm.