mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 12:36:02 +01:00
some work on session login etc
This commit is contained in:
@@ -22,8 +22,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
RedisDB.set = function(key, value) {
|
||||
RedisDB.set = function(key, value, expiry) {
|
||||
db.set(key, value);
|
||||
if (expiry !== undefined) RedisDB.expire(key, expiry);
|
||||
};
|
||||
|
||||
RedisDB.get = function(key, callback, error_handler) {
|
||||
@@ -36,6 +37,10 @@
|
||||
db.del(key);
|
||||
}
|
||||
|
||||
RedisDB.expire = function(key, expiry) {
|
||||
db.expire(key, expiry);
|
||||
}
|
||||
|
||||
// Atomic Operations
|
||||
RedisDB.incr = function(key, callback, error_handler) {
|
||||
db.incr(key, function(error, data) {
|
||||
|
||||
Reference in New Issue
Block a user