New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

read-cache

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

read-cache

Reads and caches the entire contents of a file until it is modified

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

read-cache CI

Reads and caches the entire contents of a file until it is modified.

Install

$ npm i read-cache

Usage

// foo.js
var readCache = require('read-cache');

readCache('foo.js').then(function (contents) {
	console.log(contents);
});

API

readCache(path[, encoding])

Returns a promise that resolves with the file's contents.

readCache.sync(path[, encoding])

Returns the content of the file.

readCache.get(path[, encoding])

Returns the content of cached file or null.

readCache.clear()

Clears the contents of the cache.

License

MIT © Bogdan Chadkin

Keywords

fs

FAQs

Package last updated on 19 Aug 2026

Related posts