1. read-cache
Reads and caches the entire contents of a file until it is modified
read-cache
Package: read-cache
Created by: TrySound
Last modified: Sun, 26 Jun 2022 09:12:53 GMT
Version: 1.0.0
License: MIT
Downloads: 43,592,004
Repository: https://github.com/TrySound/read-cache

Install

npm install read-cache
yarn add read-cache

read-cache Build Status

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

Dependencies

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code