expvals

This is a simple expirable cached values lib

Usage no npm install needed!

<script type="module">
  import expvals from 'https://cdn.skypack.dev/expvals';
</script>

README

Arch-Expirable-Values

This is the ArchOffice Expirable Cached Values tool that can be used in any situation, and it is very simple to use.

Usage

var expvals = require("expvals");

//set
expvals.set("YourKey1","Your Value",10); // The last parameter is the timeout (in seconds), default 30 seconds
expvals.set("Value2",200); // 30 seconds expirable value
expvals.set("Value3",(new Date())); // 30 seconds expirable value

//get only values
console.log( expvals.getVal("getVal") );
console.log( expvals.getVal("Value3") );


//get everything
console.log( expvals.get("Value2") );
setInterval(function(){console.dir(expvals.get("YourKey1"));},1000);

Installing

npm i Arch-Expirable-Values -s

Authors

  • ArcHOffice Technology - By Carlos Pisani - PurpleBooth

Keywords

Expirable Cache Values Simple