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

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin