youcache

1.0.3 • Public • Published

YouCache

Creates temporary files at script execution time and configuration time

If the environment where new Cache(<name>) is executed is suddenly closed without warning, the temporary file will not be deleted.

The configuration will not be deleted at the end of the run and can be read again.

Instalation

Module

import { Config, Cache } from "youcache";

Commonjs

const { Config, Cache } = require("youcache");

Use

const mycache = new Cache("<name>"); // The name is not mandatory
const myconfig = new Config("<name>"); // The name is required
const cache = new Cache("<name>");
const config = new Config("<name>");

// Folder path
console.log(cache.path);
console.log(config.path);
// Cleans the contents of the folder
cache.clear();
config.clear();

/youcache/

    Package Sidebar

    Install

    npm i youcache

    Weekly Downloads

    3

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    5.03 kB

    Total Files

    6

    Last publish

    Collaborators

    • fedyou