android 缓存
Long-time Android power users will be all too familiar with the “clear cache” option in recovery, but thanks to some recent changes to how Android works, the cache partition is a thing of the past. Here’s why.
长期使用Android的高级用户将对恢复中的“清除缓存”选项非常熟悉,但是由于Android的工作方式最近发生了一些变化,因此缓存分区已成为过去。 这就是为什么。
Traditionally, Android would download an update, store it on the cache partition, and then apply it to the system partition when the device was rebooted. This process takes a little bit of time, then the OS has to “optimize” after the reboot is complete in order to clean up the installation. It’s not a bad system, per se—it’s just not as efficient as it could be.
传统上,Android将下载更新,将其存储在缓存分区中,然后在重新启动设备时将其应用于系统分区。 此过程需要一点时间,然后操作系统必须在重新启动完成后进行“优化”才能清理安装。 从本质上讲,这并不是一个糟糕的系统,它没有达到应有的效率。
Starting with Android Nougat, Google implemented a new update system that mimics what the company has been using on Chrome OS for years. This new seamless update system is the entire reason the cache partition is no longer needed.
从Android Nougat开始,Google实施了一个新的更新系统,该系统模仿了该公司多年来在Chrome操作系统上使用的功能。 这种新的无缝更新系统是不再需要缓存分区的全部原因。
While we have a much longer explanation on what the new update system is and how it works, here’s the skinny. The new system still uses two partitions, but they’re both system partitions. Instead of downloading an update to the cache partition, and then applying it the current system partition, the system has two identical system partitions. The update file is then applied to the dormant partition while you continue to use the existing system partition like normal. Then, when you reboot the phone to complete the update, the system partitions are simply swapped—the updated partition becomes the new main system partition, while the other becomes dormant until another update is released.
虽然我们对新的更新系统是什么以及它如何工作有更长的解释,但这是一个肤浅的问题。 新系统仍使用两个分区,但它们都是系统分区。 系统具有两个相同的系统分区,而不是将更新下载到缓存分区,然后将其应用到当前系统分区。 然后,在继续像往常一样使用现有系统分区的同时,将更新文件应用于Hibernate分区。 然后,当您重新启动手机以完成更新时,系统分区将被简单地交换-更新后的分区变为新的主系统分区,而另一个分区处于Hibernate状态,直到发布另一个更新。
This way, instead of the phone needing to be out of commission while it updates, the entire process happens in the background. The update is downloaded and applied while you continue to use your phone, and a simple reboot is all it takes to swap the partitions. The best part is that this reboot doesn’t take much longer than a normal reboot, so you’re back in business within a few seconds.
这样,整个过程就在后台进行,而不必在更新手机时使其停止运行。 继续使用手机时,将下载并应用此更新,并且只需重新启动即可交换分区。 最好的部分是,此重新启动不会比正常重新启动花费更长的时间,因此您可以在几秒钟内恢复正常工作。
This new system eliminates the need for a cache partition altogether, so if you’re using a newer phone that is taking advantage of seamless updates, then you won’t see the “clear cache” option in recovery.
这个新系统完全不需要缓存分区,因此,如果您使用的是利用无缝更新的较新手机,则恢复中将不会看到“清除缓存”选项。
Of course, this only applies to new phones—older models that shipped with a cache partition will continue to use said partition and the traditional update model, regardless of what version of Android they’re using.
当然,这仅适用于新手机-带有缓存分区的旧型号将继续使用所述分区和传统更新模型,而不管它们使用的是哪个版本的Android。
翻译自: https://www.howtogeek.com/356365/why-android-no-longer-needs-a-cache-partition/
android 缓存