Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8546659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:05:06+00:00 2026-06-11T13:05:06+00:00

I have been reading up a little on the source for Connect and Express

  • 0

I have been reading up a little on the source for Connect and Express of how session is managed. I am still learning the basics on sessions but I do not understand how the memory is handled.

I know that the server holds the session data in memory and uses a session id to access the data. The server sends the cookie (I am guessing session cookie?) that holds the id and when the user accesses the site, the session is used again.

This is a silly question but my question is how does the memory get managed say if the user deletes his cookies or expires without renewing the session timeout? Does the data stay in memory forever?

I looked at PHP and other languages and saw documentation of how they clean up sessions. It seems they have a garbage collector (scans and deletes expired sessions). Does Connect/Express have this functionality?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T13:05:07+00:00Added an answer on June 11, 2026 at 1:05 pm

    The Connect MemoryStore (the default session storage module for the Session middleware) will not garbage-collect expired sessions. It only checks their expiration when they are accessed (at which point it will delete the storage if the session is expired), so if the user clears their cookies, the session will never be accessed again, and will never expire from the MemoryStore. Hence the warning at the Session middleware docs that MemoryStore shouldn’t be used in production.

    Connect does not provide other session storage modules and expects you to supply your own, building on the abstract Store module included with the Session middleware.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been reading up on the technical basics of how SSL works (which
I am by no means an expert at Javascript, but I have been reading
I have been doing a little reading on Flow Based Programming over the last
I’m fairly new to Codeigniter. I have been reading the user guide extensively but
i have been reading a little about REST services and i would love to
I have been doing some reading and a little bit confused, let me explain.
I've been reading up on saving objects, preserving state etc, but I'm still a
I have been reading The Little Book of Semaphores and in page 41 there
I have been noticing __construct a lot with classes. I did a little reading
I've been reading a little about temporary tables in MySQL but I'm an admitted

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.