In OS X 10.8.4, Safari 6.1, there is no Cache.db in /private/var/folders/pn/long_alphanumeric_string/C/com.apple.Safari/ [note that the path structure is a bit different as well]; the folder's only content is SafeBrowsing.db. I can't tell you if this changed in Lion, since I skipped from Leopard to Mountain Lion. The contents of ~/Library/Caches/com.apple.Safari/ in 10.8 are the same as in 10.5—Cache.db, Extensions/, and Webpage Previews/—but with two additional databases: Cache.db-shm and Cache.db-wal. I've been unable to unravel their functions.

The results of running ls -lSF ~/Library/Caches/com.apple.Safari/:

Code:
total 25840
-rw-r--r--@ 1 dkmarsh  staff  12435456 Feb 20 19:55 Cache.db
-rw-r--r--@ 1 dkmarsh  staff    758112 Feb 20 20:01 Cache.db-wal
-rw-r--r--@ 1 dkmarsh  staff     32768 Feb 20 14:23 Cache.db-shm
drwxr-xr-x  6 dkmarsh  staff       204 Feb 20 14:24 Extensions/
drwxr-xr-x  2 dkmarsh  staff        68 Feb 20 14:28 Webpage Previews/

After ⌥⌘E:

Code:
-rw-r--r--@ 1 dkmarsh  staff  12435456 Feb 20 19:55 Cache.db
-rw-r--r--@ 1 dkmarsh  staff    955872 Feb 20 20:02 Cache.db-wal
-rw-r--r--@ 1 dkmarsh  staff     32768 Feb 20 14:23 Cache.db-shm
drwxr-xr-x  6 dkmarsh  staff       204 Feb 20 14:24 Extensions/
drwxr-xr-x  2 dkmarsh  staff        68 Feb 20 14:28 Webpage Previews/
frittata:~ dkmarsh$ ls -lSF ~/Library/Caches/com.apple.Safari/

After quitting and relaunching Safari:

Code:
total 29296
-rw-r--r--@ 1 dkmarsh  staff  12435456 Feb 20 20:04 Cache.db
-rw-r--r--@ 1 dkmarsh  staff   2529712 Feb 20 20:04 Cache.db-wal
-rw-r--r--@ 1 dkmarsh  staff     32768 Feb 20 20:04 Cache.db-shm
drwxr-xr-x  6 dkmarsh  staff       204 Feb 20 20:04 Extensions/
drwxr-xr-x  2 dkmarsh  staff        68 Feb 20 14:28 Webpage Previews/

The only thing changing is Cache.db-wal…and it's growing.

Next, after moving ~/Library/Caches/com.apple.Safari/ to the Desktop, then quitting and relaunching Safari:

Code:
total 14752
-rw-r--r--@ 1 dkmarsh  staff  5070848 Feb 20 20:12 Cache.db
-rw-r--r--@ 1 dkmarsh  staff  2447312 Feb 20 20:13 Cache.db-wal
-rw-r--r--@ 1 dkmarsh  staff    32768 Feb 20 20:12 Cache.db-shm
drwxr-xr-x  5 dkmarsh  staff      170 Feb 20 20:12 Extensions/

Cache.db-wal is still more or less at its expanded size, but Cache.db has been cut by about 60%. (The Webpage Previews folder does eventually regenerate, under what circumstances I'm not sure. It's related to Top Sites, but only tangentially, since I never use that feature.)

Even a modest amount of googling reveals that the apparent dysfunctionality of Empty Caches/⌥⌘E in Mavericks has caused much gnashing of teeth. I can't recommend trashing ~/Library/Caches/com.apple.Safari/, but that's certainly what I would do, were I suspecting I had a cache-related issue. As for the Extensions folder, that appears to regenerate with no ill effects. There are slight changes in numbers of items within some individual Extensions' folders—perhaps the result of updated definitions or the like?—but my AdBlock customizations, for example, are still intact.



dkmarsh—member, FineTunedMac Co-op Board of Directors