file-entry-cache
Advanced tools
Comparing version 1.0.0 to 1.0.1
12
cache.js
@@ -72,2 +72,14 @@ module.exports = { | ||
/** | ||
* Remove an entry from the file-entry-cache. Useful to force the file to still be considered | ||
* modified the next time the process is run | ||
* | ||
* @method removeEntry | ||
* @param entryName | ||
*/ | ||
removeEntry: function (entryName) { | ||
delete normalizedEntries[entryName]; | ||
cache.removeKey(entryName); | ||
}, | ||
/** | ||
* Delete the cache file from the disk | ||
@@ -74,0 +86,0 @@ * @method deleteCacheFile |
{ | ||
"name": "file-entry-cache", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Super simple cache for file metadata, useful for process that work o a given series of files and that only need to repeat the job on the changed ones since the previous run of the process", | ||
@@ -5,0 +5,0 @@ "repository": "royriojas/file-entry-cache", |
@@ -41,2 +41,8 @@ # file-entry-cache | ||
// if you want to prevent a file from being considered non modified | ||
// something useful if a file failed some sort of validation | ||
// you can then remove the entry from the cache doing | ||
cache.removeEntry('path/to/file'); // path to file should be the same path of the file received on `getUpdatedFiles` | ||
// that will effectively make the file to appear again as modified until the validation is passed. In that | ||
// case you should not remove it from the cache | ||
@@ -43,0 +49,0 @@ // if you need all the files, so you can determine what to do with the changed ones |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9657
102
97