Disk Cache vs Memory Cache
Also known as: disk vs memory cache, two level cache, disk cache vs memory cache
A memory cache stores data in RAM for fast, volatile reuse within a running app, while a disk cache persists data to storage so it survives app restarts. Most apps layer both: a small fast memory tier in front of a larger persistent disk tier.
- Memory cache lives in RAM (fast, volatile); disk cache lives in storage (slower, persistent).
- Clearing cache frees disk space only; the RAM memory tier is cleared by force stop or reboot.
- Apps layer both as a two-level cache: memory first, disk second, network last.
Two tiers, two trade-offs
A memory cache keeps decoded objects (such as bitmaps or parsed responses) in RAM. It is the fastest tier but volatile: it is wiped when the process is killed, and the OS can reclaim it under memory pressure. Sizes are deliberately small, often a fraction of the app's heap, and entries are usually managed with LRU eviction.
A disk cache writes serialized data to internal storage so it persists across launches. It is far larger and survives restarts, but reads are slower and it consumes real on-device storage. Apps commonly run a two-level cache: check memory first, fall back to disk, then fetch from the network and populate both tiers on the way back.
Where each lives on the device
On Android, the disk cache typically lives under the directory returned by getCacheDir() or getExternalCacheDir(), and shows up in Settings > Apps > [app] > Storage as Cache. On iOS, persistent caches usually sit in NSCachesDirectory (the `Library/Caches` folder), which the system may purge when storage runs low and which iCloud does not back up.
The memory cache never appears in storage settings because it occupies RAM, not flash. This is the key reason "clearing cache" in the OS frees disk space but does nothing to RAM, while "force stop" or a reboot clears the memory tier but leaves disk-cached files in place.
What cache cleanup actually clears
When you clear an app's cache from system settings or with a cleaner, you are clearing the disk cache plus other reclaimable temporary files, not the in-RAM memory cache. That is why the freed space is visible immediately, and why the app simply rebuilds its disk cache the next time you use it.
Cleanor targets exactly this reclaimable disk-cache and junk files layer so you recover storage without touching documents or settings. Understanding the split clarifies a common confusion: cache cleanup is a storage operation, not a memory or RAM optimization.