mirror of
https://github.com/seejohnrun/haste-server.git
synced 2025-12-15 12:25:55 +00:00
Kick expirations back on view
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user