You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 27, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ module.exports = {
52
52
|**`cacheKey`**|`{Function(options, request) -> {String}}`|`undefined`| Allows you to override default cache key generator |
53
53
|**`cacheDirectory`**|`{String}`|`findCacheDir({ name: 'cache-loader' }) or os.tmpdir()`| Provide a cache directory where cache items should be stored (used for default read/write implementation) |
54
54
|**`cacheIdentifier`**|`{String}`|`cache-loader:{version} {process.env.NODE_ENV}`| Provide an invalidation identifier which is used to generate the hashes. You can use it for extra dependencies of loaders (used for default read/write implementation) |
55
-
|**`compare`**|`{Function(stats, dep) -> {Boolean}}`|`undefined`| Allows you to override default comparison function between the cached dependency and the one is being read. Return `true` to use the cached resource |
55
+
|**`compare`**|`{Function(stats, dep, cacheData) -> {Boolean}}`|`undefined`| Allows you to override default comparison function between the cached dependency and the one is being read. Return `true` to use the cached resource |
56
56
|**`precision`**|`{Number}`|`0`| Round `mtime` by this number of milliseconds both for `stats` and `dep` before passing those params to the comparing function |
57
57
|**`read`**|`{Function(cacheKey, callback) -> {void}}`|`undefined`| Allows you to override default read cache data from file |
58
58
|**`readOnly`**|`{Boolean}`|`false`| Allows you to override default value and make the cache read only (useful for some environments where you don't want the cache to be updated, only read from it) |
"Invalid options object. Cache Loader (Pitch) has been initialised using an options object that does not match the API schema.
4
+
"Invalid options object. Cache Loader (Pitch) has been initialized using an options object that does not match the API schema.
5
5
- options.cacheIdentifier should be a string.
6
6
-> Provide an invalidation identifier which is used to generate the hashes. You can use it for extra dependencies of loaders (used for default read/write implementation)."
7
7
`;
8
8
9
9
exports[`validate options error 1`] =`
10
-
"Invalid options object. Cache Loader has been initialised using an options object that does not match the API schema.
10
+
"Invalid options object. Cache Loader has been initialized using an options object that does not match the API schema.
11
11
- options.cacheIdentifier should be a string.
12
12
-> Provide an invalidation identifier which is used to generate the hashes. You can use it for extra dependencies of loaders (used for default read/write implementation)."
13
13
`;
14
14
15
15
exports[`validate options unknown (pitch) 1`] =`
16
-
"Invalid options object. Cache Loader (Pitch) has been initialised using an options object that does not match the API schema.
16
+
"Invalid options object. Cache Loader (Pitch) has been initialized using an options object that does not match the API schema.
17
17
- options has an unknown property 'unknown'. These properties are valid:
0 commit comments