Why should the cache be cleaned regularly?
Xiaomiโs MIUI 12-based smartphones eventually start to slow down, warm up and discharge faster โ even if you havenโt installed new apps. The main reason is cache clogging, which is a temporary data buffer created to speed up programs, but uncontrollably turns into โdigital junkโ that takes up gigabytes of memory.
In MIUI 12, the cache is divided into three types: application cache (data from individual programs), system cache (OS files), and Dalvik cache (optimized code for fast loading), the latter being especially important: cleaning it can solve problems with โdeparturesโ of applications after updates. But hereโs the caveat: improper cleaning of the Dalvik cache without rebooting leads to cyclical errors in launching applications.
Not only does the cache shrink, but it fragments, and when memory is crammed with small files, it takes longer for the system to process them, for example, Google Play Services cache can take up to 1GB, and instant messengers like Telegram or WhatsApp can take up to 500MB each, while manually cleaning through settings does not remove all temporary files.
Method 1: Clearing the cache of individual applications
The safest method is to remove the cache for specific programs, which won't affect their work, but will free up space. In MIUI 12, the path to the cleanup menu has changed from previous versions:
- Open Settings โ Applications โ Application Management.
- Slip on the three dots in the upper right corner and select Sort by size.
- Click on an app (such as Facebook or YouTube) and select Warehouse.
- Click Clear Cache (not to be confused with Clear Data!).
โ ๏ธ Note: Do not clear the cache for Google Play Store, Google Play Services and MIUI System is not absolutely necessary. This can lead to application update errors and malfunctions in Google services.
Cache size applications > 200 MB|Social media (VK, Instagram, TikTok)|Messengers (Telegram, WhatsApp)|Games (PUBG, Genshin Impact)|Navigators (Google Maps, Yandex.Maps)-->
To speed up the process, use a cache filter. Apps with more than 100MB of temporary files usually give performance gains after cleaning. For example, Instagram cache can take up to 1.5GB, and TikTok can take up to 2GB when used actively.
Method 2: Mass cleaning the cache of all applications
If you donโt have time to manually clean up, use the built-in MIUI 12 to mass-delete the cache, which removes temporary files from all user applications except system ones:
- Go to Settings โ Storage โ Cleaning.
- Click the app cache (usually displayed at the top of the list).
- Confirm the action with the Clean button.
| Type of data | Removed? | Effects of consequences |
|---|---|---|
| Cash app. | โ Yes. | Applications are loaded longer on first launch |
| Application data | โ No. | Logins, settings and progress in games will continue |
| Download files | โ No. | Music, documents and photographs will remain |
| System updates | โ No. | Does not affect the stability of MIUI |
After a mass cleanup, it is recommended to restart the phone, which is due to the fact that some applications (for example, MIUI Launcher) cache data in RAM. Without a reboot, the cleaning effect will be incomplete.
Once a week | Once a month | Only when the phone brakes | Never cleaned | I don't know what it is-->
Method 3: Cleaning Dalvik cache (for power users)
Dalvik cache is an optimized file on the Android virtual machine that speeds up the launch of applications. In MIUI 12, cleaning it is rarely required, but can help after a system update or if errors like com.android.phone are stopped.
โ ๏ธ Warning: Improperly cleaning the Dalvik cache without restarting to recovery results in an โinfinite loadโ of the phone, a method that is only recommended if you are confident in your actions or follow the recovery instructions.
- Turn off the phone.
- Press the Power button + Volume up to enter Recovery Mode.
- Select Advanced โ Wipe Dalvik Cache (use volume buttons for navigation).
- Confirm the action and restart the phone.
What to do if the phone freezes after cleaning the Dalvik cache?
Cleaning Dalvik cache is useful if:
- ๐ฑ Phone is getting an error android.process.media stopped.
- ๐ Apps are painted immediately after the update MIUI.
- ๐ข The system slows down despite a sufficient amount of free memory.
Method 4: Using the built-in MIUI optimizer
MIUI 12 has a built-in Security tool (formerly Optimizer) that automatically analyzes and cleans the cache, and its advantage is to cleverly delete only unnecessary files, without the risk of damaging system data.
- Open the Security app (the shield icon).
- Go to the Cleanup tab.
- Press Deep Clean and wait for the analysis to be completed.
- Select the Cash applications and confirm the cleanup.
Unlike manual cleaning, this method:
- ๐ Analyzes unused files (e.g. thumbnails of images that have not been opened in a long time).
- ๐ Shows a detailed report on which apps take up the most space.
- ๐ Offers regular cleaning on schedule (e.g. once a week).
๐ก
If you see an app with a cache of more than 500MB in your SEO report but donโt use it often, consider removing it. For example, Facebook and Messenger can take up to 3GB of cache when youโre using it, but theyโre easy to replace with Facebook Lite or the web.
Method 5: Cleaning the cache through ADB (for developers)
For users with unlocked bootloader and enabled debugging over USB, a method of clearing the cache through ADB is available. This method is useful if the phone does not respond to touch or you need to clear the cache of system applications.
Before we start:
- ๐ฅ๏ธ Install. ADB Tools on the computer (official page).
- ๐ฑ Enable Developer Mode on your phone: Settings โ The phone. โ Version. MIUI (tap 7 times).
- ๐ Connect your phone to your PC and allow debugging. USB.
Cleanup commands:
adb shell pm clear --user 0 com.android.providers.media # Clearing up media provider's cache
adb shell cmd package bg-dexopt-job # Optimization of Dalvik cache
adb shell pm trim-caches 500M # Cache Clearing of all applications (500MB โ threshold)โ ๏ธ Note: pm clear command will reset application data (including logins)! To clean only the cache use:
adb shell pm clear --user 0 -f com.example.app # Replace com.example.app with the app packageWhat if cleaning the cache doesnโt help?
If after cleaning the cache, the phone still brakes, the problem may be a nuisance:
- ๐งน Memory clogging: Check the free space in the Settings section โ If less than 10%, delete the files or transfer them to the storage. SD-map.
- ๐ Memory fragmentation: B MIUI 12 no built-in defragmenter, but rebooting or resetting to factory settings will help.
- ๐ Firmware failures: If the brakes appeared after the update, try rolling back to the previous version MIUI via Fastboot.
- ๐ Battery wear: With battery health below 80% (checked through ##4636##) the phone begins to artificially limit performance.
๐ก
If the cache cleanup fails, check the background activity of the apps in Settings โ Battery โ Battery Use. Apps like Facebook or AliExpress can consume up to 30% of the charge in the background, which indirectly affects performance.
For diagnosis, use the hidden test menu:
- Enter the dialer ##4636##.
- Go to Battery Information and check the Wear Level parameter.
- In the Usage Statistics section, see what processes load the CPUs.