I'm using Sails to add some data to Redis... It is working OK but I'm not sure how to set the EXPIRE for a key...
Im using the sails-redis adapter/connection for the model... My model looks like this
module.exports = {
connection: 'cache',
attributes: {
id: {type: 'string', primaryKey: true},
data: {type: 'string'}
}
};
To save the model I use
Cache.create({id: "somekey", data: data}, function(err, data){})