Use recursive ctime to determine plugin cache expiration

Summary:
Disabling `atime` on Linux is quite common. (I don't have data to back this up,
but with my sample size of n=1, 100% fall into this bucket.) In that case,
the plugins will be cached indefinitely.

Using `ctime` on the directory doesn't really mean anything because it is
only affected by changes *to* the directory, not the files inside.

So, let's do this right and use the most recent change to any of the files
*inside* the directory instead.

Reviewed By: danielbuechele

Differential Revision: D9479491

fbshipit-source-id: 6945d7bf87defa67679cacdaf0a978d8ff1770c3
This commit is contained in:
Pascal Hartig
2018-08-23 04:46:03 -07:00
committed by Facebook Github Bot
parent 624d06f2c2
commit 715d12db8d
3 changed files with 58 additions and 38 deletions

View File

@@ -2252,7 +2252,7 @@ min-document@^2.19.0:
dependencies:
dom-walk "^0.1.0"
minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.4:
minimatch@3.0.4, minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
dependencies:
@@ -2574,6 +2574,12 @@ readable-stream@^2.0.1, readable-stream@^2.0.6, readable-stream@^2.1.4, readable
string_decoder "~1.0.3"
util-deprecate "~1.0.1"
recursive-readdir@2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.2.tgz#9946fb3274e1628de6e36b2f6714953b4845094f"
dependencies:
minimatch "3.0.4"
regenerate@^1.2.1:
version "1.3.3"
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f"