🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

cache-io

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cache-io

Memory cache for node js

1.0.1
Source
npm
Version published
Maintainers
1
Created
Source

cache-io

###Russian Memory cache для node js

Использование

Инициализация нового хранилища

'use strict';

var cache = new (require('cache-io'));

Проверка на наличие ключа

cache.has('keyName');
// return boolean

Установка значения кэша

  • expire - 1000 * expire
  • data - установка значения кэша
cache.set('keyName',expire,data,callback);
// return value || null

Обновить значения истечения кэша

cache.update('keyName');
// return boolean

Получить значение кэша, если нету то на сохранение:

  • data - значение кэша
  • time - истечение кэша
cache.get('keyName'[,data,time]);
// return mixed

Удалить значение кэша

cache.remove('keyName');
// return boolean

Возвращает ключи кэша

cache.keys();
// return array

cache-io

###English Memory cache for node js

Using

Initialize the new storage

'use strict';

var cache = new (require('cache-io'));

Checking for key cache

cache.has('keyName');
// return boolean

Setting the cache values

  • expire - 1000 * expire
  • data - cache setting values
cache.set('keyName',expire,data);
// return null

Refresh cache expiration value

cache.update('keyName');
// return boolean

Get the value of the cache if it does not have to maintain:

  • data - cache value
  • time - cache expiration
cache.get('keyName'[,data,time]);
// return mixed

Remove the cache value

cache.remove('keyName');
// return boolean

Returns the cache keys

cache.keys();
// return array

Keywords

node

FAQs

Package last updated on 26 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts