iocache

1.4.0 • Public • Published

iocache

对 jcache 进行了一层封装,提供与 ioredis 相同的 API,但是

  • 不是所有的功能都支持
  • 也不是所有的返回结果都一致

请查看 __tests__/test-case.js 里的测试示例的结果。

安装

npm i iocache

使用

const path = require('path')
const JcacheWrapper = require('iocache')(path.resolve(__dirname, './bin/jcache.node'))
 
const JcacheClient = new JcacheWrapper({
  id: 788,
  name: process.env.JCACHE_NAME
})
 
(async function () {
  await cacheClient.set('string', 'ok')
  await cacheClient.get('string')
 
  await cacheClient.rpush('list', 'v1')
  await cacheClient.rpop('list')
})()
 

Readme

Keywords

none

Package Sidebar

Install

npm i iocache

Weekly Downloads

1

Version

1.4.0

License

MIT

Unpacked Size

20.2 kB

Total Files

9

Last publish

Collaborators

  • booxood
  • chuyik
  • koppt
  • mamboer