Like many applications, Lightroom uses cache to make things run faster. Occasionally, something goes wrong with the management of the cache and it becomes necessary to clear or purge it. This post will explain the different types of cache, why you might want to purge it, and how to do it.
Types of Cache in Lightroom
There are four primary types of cache that Lightroom uses: camera raw, video, preview, and Smart Preview.
When you view or edit raw images in the Develop module, Lightroom will generate previews using the original image data and then updating the preview for any processing or adjustments that have been applied. The process is a little faster if the original image data is in the Camera Raw cache, so Lightroom checks there first to see if it can skip some of the raw processing.
Similar to the Camera Raw cache, Lightroom maintains a video cache to help with the performance of viewing and manipulating video files.
Lightroom uses previews to display thumbnails in many places, and it keeps cached versions of these previews in its preview cache.
Smart Preview Cache
New to Lightroom 5 are Smart Previews that allow for offline editing of images. Unlike the Preview cache that gets used for all images, Smart Previews are only created when you tell Lightroom to create them so not every image is represented.
Why You Might Want To Clear Your Cache
There are a few reasons why you might want to clear your cache.
A corrupted cache can cause weird behavior in Lightroom. You might be missing all your previews, or you might start getting error messages during operations that require or generate previews, such as when importing new images.
You might get an error message from Lightroom that tells you that it is unable to read from the preview cache and needs to close; this is a clear indicator that a purge might be in order.
Finally, the cache file could be bloated with a bunch of stuff you no longer care about and taking up extra space on your hard drive. In that case, starting fresh and forcing Lightroom to rebuild it with only the images in your catalog can save you disk space.
How To Clear Your Cache
The first two types of cache, the Camera Raw and Video cache, can be purged from inside your Lightroom Preferences.
Go to Preferences > File Handling to find the purge buttons for both the Camera Raw and Video cache.
The Preview and Smart Preview caches are a little different. By default, Lightroom stores the cache data for the Previews in a file next to your catalog in a filed named [Catalog name] Previews.lrdata and the data for the Smart Previews in [Catalog name] Smart Previews.lrdata. Purging those caches involves deleting the corresponding .lrdata file.
If you delete either of those .lrdata files, Lightroom will regenerate them and repopulate the previews as they are needed. Keep in mind that if you have a huge catalog and delete all of your previews, Lightroom needs to regenerate them so it could take time.
If you delete your preview cache, the next time you open Lightroom, it will generate a new preview .lrdata file. You should see it start to fill in previews, and you should also see the size of the .lrdata file continue to grow as Lightroom continues to generate more previews.
The Smart Preview cache file is not automatically generated when you open Lightroom like the normal preview cache is. Instead, it will be generated when you create a new smart preview.