All posts by Pramod T P

magento 2 increase session timeout

  • Log in to Magento using your administrator account.
    In the left sidebar, click Stores, and then under Settings, click Configuration.
  • Click Advanced, and then click Admin.
    Under Security, in the Admin Session Lifetime (seconds) text box,
  • type the session timeout interval in seconds that you want to use. For example, a value of 1200 sets a timeout interval of 20 minutes.
  • Click Save Config.
  • Log out of Magento, and then log back in. The new session timeout interval is now active.

Magento 2 Observers

Observers are the particular classes that control the general behavior, performance, or change in the business logic of the store. They are executed whenever a specific event for which they were set to listen is triggered.

To create an observer in Magento 2, you must place your class file under the ModuleRoot/Observer directory. The observer class file should use Magento\Framework\Event\Observer and Magento\Framework\Event\ObserverInterface class and define the executive function.