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 7684163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:57:45+00:00 2026-05-31T18:57:45+00:00

I looking for some information about the difference of the different session types available

  • 0

I looking for some information about the difference of the different session types available in Magento.

There’s a core session, a customer session and a checkout session. But I’m not quite sure when to use which one and how they might behave differently. Are they all valid for the same time or does a checkout session get invalidated earlier than the core session?

  • 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-05-31T18:57:46+00:00Added an answer on May 31, 2026 at 6:57 pm

    Great question!

    To answer the question directly: All session models lifetime are the same. Session lifetime is determined by configuration in Magento and in your server software. What you are probably intending to ask (in the Magento way of handling various sessions) is, “How long is the data for a given session type persisted?”

    The answer is one of implementation, so the best way is to search the code for instantiation points. The search pattern to use is getSingleton(‘core/session’) (or whichever session model). Anywhere that this is called – if it’s the first time it’s encountered – will create the session namespace (explained below) in the $_SESSION superglobal.

    So, sessions are never “killed”, but the data gets cleared depending on the implementation. The one that does this notoriously is checkout/session, as the data gets wiped after an order is placed.

    Beyond this, you can rely that session is there for your persistence needs.

    Session models in Magento use an abstract base class to define an API of sorts, Mage_Core_Model_Session_Abstract. This class fills the following roles/functions:

    1. Session namespacing via the init() method, literally separating stored values for each type under $_SESSION[$namespace]
    2. Getters for (connection to) the session-related configuration settings (including cookie lifetime, SID, security settings, etc.)
    3. Flash message storage and retrieval (addError(), addMessage(), addNotice(), and addSuccess())
    4. Getter for session storage configuration and methods
    5. Overloading (magic getters and setters) for setting params at will through Varien_Object::__call(). *Note that sessions have a modified magic getter which allows you to retrieve a datum from session and unset it with one call (e.g. $session->getSomeParam(true))

    So, if you want your module to have its own session namespace, simply declare a session model as extending from the session abstract and in the protected _construct() call $this->init('namespace').

    All data for session models will be set in array keys under the session namespace; for core this would be:

    $session = Mage::getSingleton('core/session')->setSomeValue('Some string');
    

    could be represented as

    $_SESSION['core']['some_value'] = 'Some string'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was just looking through some information about Google's protocol buffers data interchange format.
I have done some searches looking for information about how to do logging with
I'm looking for a module or some way to obtain the information about the
I was looking for some technical information about how RequestInterceptor from the WCF REST
I've tried looking for some information about a query I'm trying to write and
I'm developping an application and I'm looking for some cool informations about protecting it
I'm looking for some information and a little history. I am writing a program
I'm looking for some information on Routing in MVC with C#. I'm currently very
All, I'm looking for some information on connecting a Flash (not Flex) application to
I'm looking for some documentation on how Information Retrieval systems (e.g., Lucene) store their

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.