appium / appium-base-driver

Base class for an Appium driver
Other
82 stars 130 forks source link

fix: Update apps cache behaviour for expired items #541

Closed mykola-mokhnach closed 2 years ago

mykola-mokhnach commented 2 years ago

After longer meditation on LRU cache sources it turns out that has check does not actually care about expired items removal. Only the get check does that. Also, it could be that the internal structure of the cached file/folder is changed while it's being cached. For now I've added a very simple (and fast) integrity check for cached folders, which makes sure that the amount of items in the folder (files and subfolders) has not been decreased since the last check.

Related to https://github.com/appium/appium/issues/16109