Kick expirations back on view

This commit is contained in:
John Crepezzi 2011-11-28 01:13:14 -05:00
parent cd9bf18d29
commit 92e0f579ca
5 changed files with 12 additions and 8 deletions

View file

@ -12,7 +12,7 @@ var FileDocumentStore = function(options) {
};
// Save data in a file, key as md5 - since we don't know what we could be passed here
FileDocumentStore.prototype.set = function(key, data, callback) {
FileDocumentStore.prototype.set = function(key, data, callback, setExpire) {
try {
var _this = this;
fs.mkdir(this.basePath, '700', function() {
@ -31,7 +31,7 @@ FileDocumentStore.prototype.set = function(key, data, callback) {
};
// Get data from a file from key
FileDocumentStore.prototype.get = function(key, callback) {
FileDocumentStore.prototype.get = function(key, callback, setExpire) {
fs.readFile(this.basePath + '/' + hashlib.md5(key), 'utf8', function(err, data) {
if (err) {
callback(false);