redis-promised

    0.9.2 • Public • Published

    Redis 快速存储模块

    引入


    var REDIS = require('@ym/redis');
    var redis = new REDIS({
        port: port,
        host: host,
        db: db,
        retry_max_value: retry_max_value,
        password: authpassword,
        prefix: prefix
    });

    Usage


    SET

    redis.set(key,value).then(status=>{
        status......
    });

    if set success, status = 'ok'

    GET

    redis.get(key).then(value=>{
        value......
    });

    EXPIRE

    为存储内容设置过期时间(s)

    redis.expire(key,expire_time);

    为存储内容设置过期时间(ms)

    redis.pexpire(key,expire_time);

    HMSET

    redis.hmset(hash,objectValue,expire).then(status=>{
        status......
    });

    Most new features added on

    expire,pexpire,expireat,pexpireat,move,exists,type,persist,pttl,ttl,randomkey,hmset,hmget,set,get,delete click here to docs about

    Keywords

    none

    Install

    npm i redis-promised

    DownloadsWeekly Downloads

    1

    Version

    0.9.2

    License

    ISC

    Unpacked Size

    11.1 kB

    Total Files

    4

    Last publish

    Collaborators

    • xuezi