Added static document loading on start

This commit is contained in:
John Crepezzi 2011-11-22 09:22:37 -05:00
parent 32b4f842b7
commit e403549e13
5 changed files with 39 additions and 12 deletions

View file

@ -34,14 +34,16 @@ RedisDocumentStore.connect = function(options) {
};
// Save file in a key
RedisDocumentStore.prototype.set = function(key, data, callback) {
RedisDocumentStore.prototype.set = function(key, data, callback, skipExpire) {
var _this = this;
RedisDocumentStore.client.set(key, data, function(err, reply) {
if (err) {
callback(false);
}
else {
_this.setExpiration(key);
if (!skipExpire) {
_this.setExpiration(key);
}
callback(true);
}
});