How to use the redis.saveClient.set function in redis

To help you get started, we’ve selected a few redis examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pilif / tempalias / lib / tempalias.js View on Github external
redis.set('aliases:' + id, JSON.stringify(alias), function(data) {
              if (alias.max_usage){
                redis.set('counter:' + id, alias.max_usage,  function(data){
                  callback(alias.aid);
                })
              }else{
                callback(alias.aid);
              }
            });
          });
github pilif / tempalias / lib / tempalias.js View on Github external
getNextId(function(id) {
            alias.aid = id;
            redis.set('aliases:' + id, JSON.stringify(alias), function(data) {
              if (alias.max_usage){
                redis.set('counter:' + id, alias.max_usage,  function(data){
                  callback(alias.aid);
                })
              }else{
                callback(alias.aid);
              }
            });
          });
        }
github pilif / tempalias / lib / tempalias_http.js View on Github external
redis.get(lock_key, function(exp){
                if (parseInt(exp, 10) < (t)){
                  redis.set(lock_key, t+config.http.rate_limit, function(){
                    rbl_check();
                  });
                }else{
                  err(403, {error: 'rate-limited', description: 'please wait a moment before generating the next alias'});
                }
              });
            }else{
github pilif / tempalias / lib / tempalias.js View on Github external
redis.setnx('reservations:' + id, 'reserved', function(data) {
            if (parseInt(""+data, 10) == 0) {
              redis.set('admin:keylength', len, function(data){
                uuidg();
              });
            }
            callback(id);
          });
        }();