read-cache

WebJar for read-cache

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

read-cache
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

read-cache
WebJar for read-cache
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/TrySound/read-cache

Download read-cache

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/read-cache/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>read-cache</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/read-cache/
implementation 'org.webjars.npm:read-cache:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/read-cache/
implementation ("org.webjars.npm:read-cache:1.0.0")
'org.webjars.npm:read-cache:jar:1.0.0'
<dependency org="org.webjars.npm" name="read-cache" rev="1.0.0">
  <artifact name="read-cache" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='read-cache', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "read-cache" % "1.0.0"
[org.webjars.npm/read-cache "1.0.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : pify jar [2.3.0,3)

Project Modules

There are no modules declared in this project.

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

Versions

Version
1.0.0