
Security News
Free Certified Patch for Critical Rails Active Storage Vulnerability
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.
Reads and caches the entire contents of a file until it is modified.
$ npm i read-cache
// foo.js
var readCache = require('read-cache');
readCache('foo.js').then(function (contents) {
console.log(contents);
});
Returns a promise that resolves with the file's contents.
Returns the content of the file.
Returns the content of cached file or null.
Clears the contents of the cache.
MIT © Bogdan Chadkin
While `node-cache` is a general-purpose in-memory cache module for Node.js and does not specifically target file content caching, it can be used to manually implement a similar functionality by reading file contents and storing them in the cache. Compared to `read-cache`, `node-cache` offers more flexibility in what can be cached but requires more setup for caching file contents.
This package provides a simple in-memory cache similar to `node-cache`. It can be used to cache any JavaScript object, including file contents. Like `node-cache`, it offers more general caching capabilities but lacks the file-specific optimizations and automatic updates provided by `read-cache`.
FAQs
Reads and caches the entire contents of a file until it is modified
The npm package read-cache receives a total of 0 weekly downloads. As such, read-cache popularity was classified as not popular.
We found that read-cache demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.

Security News
/Threat Research
A malicious Ruby gem runs a credential-stealing worm during installation, poisons AI coding tools, and can wipe files when a stolen GitHub token is revoked.

Security News
GitHub is tightening GitHub Actions security with new restrictions on privileged pull request workflows. Here's what changes and how maintainers are affected.