session.gc_maxlifetime:1440秒

时间:2015-10-07 18:58:25

标签: php session garbage-collection

调查结果:

我已经对PHP Session进行了一些研究,并且session.gc_maxlifetime的值1440达到了maximum value秒。

我已在php.net上读到session.gc_maxlifetime 65535// Dependencies var expect = require('chai').expect; var sinon = require('sinon'); var mockery = require('mockery'); var reloadStub = require('../../../spec/utils/reloadStub'); describe('UNIT: userController.js', function() { var reportErrorStub; var controller; var userModel; before(function() { // mock the error reporter mockery.enable({ warnOnReplace: false, warnOnUnregistered: false, useCleanCache: true }); // load controller and model controller = require('./userController'); userModel = require('./userModel'); }); after(function() { // disable mock after tests complete mockery.disable(); }); describe('#createUser', function() { var req; var res; var status; var end; var json; // Stub `#save` for all these tests before(function() { sinon.stub(userModel.prototype, 'save'); }); // Stub out req and res beforeEach(function() { req = { body: { username: 'Andrew', userID: 1 } }; status = sinon.stub(); end = sinon.stub(); json = sinon.stub(); res = { status: status.returns({ end: end, json: json }) }; }); // Reset call count after each test afterEach(function() { userModel.prototype.save.reset(); }); // Restore after all tests finish after(function() { userModel.prototype.save.restore(); }); it('should call `User.save`', function(done) { controller.createUser(req, res); /** * Since Mongoose's `new` is asynchronous, run our expectations on the * next cycle of the event loop. */ setTimeout(function() { expect(userModel.prototype.save.callCount).to.equal(1); done(); }, 0); }); } }

问题:

  1. 是否可以将我的maxlifetime设置为超过65535秒?
  2. 为什么会话值为1440?
  3. 如果我们将会话maxlifetime增加到65535秒以上会发生什么。服务器配置不支持这个吗?

0 个答案:

没有答案