thinkjs/lib/Lib/Driver/Session/FileSession.js

26 lines
649 B
JavaScript

/**
* 文件Session
* @return {[type]} [description]
*/
var os = require("os");
module.exports = inherits("FileCache", function(){
return {
/**
* gc类型
* @type {String}
*/
gcType: "FileSession",
/**
* 差异化的init
* @return {[type]} [description]
*/
init: function(options){
this.super_("init", options);
this.options.cache_path = C('session_path') || (os.tmpdir() + "/thinkjs");
this.key = this.options.cookie;
this.updateExpire = true;
mkdir(this.options.cache_path);
}
}
})