koajs/session

Expired session is not empty.

rico345100 opened this issue · 0 comments

I need to check session is empty. After session expired, using console.log of session returns {}. But when I try Object.keys(session).length, it's not 0 even there's no property in the session.

So I try print session directly and now it shows me like this:

console.log('Session: ', context.session);   // {}
console.log('Keys: ' + Object.keys(context.session));  // _sessCtx,_ctx,isNew

How do I guarantee that session is expired and it's empty?