Saturday, June 3, 2023
  • Home
  • About Us
  • Disclaimer
  • Contact Us
  • Terms & Conditions
  • Privacy Policy
T3llam
  • Home
  • App
  • Mobile
    • IOS
  • Gaming
  • Computing
  • Tech
  • Services & Software
  • Home entertainment
No Result
View All Result
  • Home
  • App
  • Mobile
    • IOS
  • Gaming
  • Computing
  • Tech
  • Services & Software
  • Home entertainment
No Result
View All Result
T3llam
No Result
View All Result
Home Services & Software

The way to use Redis for Magento 2 session administration

admin by admin
May 23, 2023
in Services & Software
0
How to use Redis for Magento 2 session management
0
SHARES
0
VIEWS
Share on FacebookShare on Twitter


To make use of Redis for session administration in Magento 2, you’ll must configure Magento to make the most of Redis because the session storage backend. Right here’s a step-by-step information on find out how to set it up

Set up Redis

Be sure to have Redis put in and working in your server or native setting. You may obtain Redis from the official web site and comply with the set up directions on your working system.

Configure Magento 2 to make use of Redis for session storage:

1. Log in to your Magento 2 server or entry the Magento 2 codebase.
2. Within the Magento 2 root listing, open the `app/and many others/env.php` file.
3. Find the `session` configuration part, which ought to appear like this:

'session' => [
    'save' => 'files',
    'save_path' => 'path/to/session/files',
]

4. Exchange the ‘save‘ worth with ‘redis‘ and add a ‘redis‘ key to the ‘session‘ array with the Redis server configuration:

'session' => [
    'save' => 'redis',
    'redis' => [
        'host' => '127.0.0.1',
        'database' => '2',
        'log_level' => '4',
        'port' => '6379',
        'password' => '',
        'timeout' => '2.5',
        'persistent_identifier' => '',
        'compression_threshold' => '2048',
        'compression_library' => 'gzip',
        'max_concurrency' => '6',
        'break_after_frontend' => '5',
        'break_after_adminhtml' => '30',
        'first_lifetime' => '600',
        'bot_first_lifetime' => '60',
        'bot_lifetime' => '7200',
        'disable_locking' => '0',
        'min_lifetime' => '60',
        'max_lifetime' => '2592000',
        'sentinel_master' => '',
        'sentinel_servers' => '',
        'sentinel_connect_retries' => '5',
        'sentinel_verify_master' => '0'
    ]
]

5. Save the modifications to the `env.php` file.
Clear Magento cache: Clear the Magento cache to make sure the brand new session configuration takes impact. You are able to do this by working the next command from the Magento root listing:
php bin/magento cache: clear

Trying to find an skilled
Magento Firm ?
Learn Extra


Check session administration with Postman:

1. Open Postman or any REST API testing instrument.
2. Set the HTTP technique to POST.
3. Set the URL to your Magento 2 base URL adopted by /relaxation/V1/integration/admin/token (e.g., `http://yourmagento2domain.com/relaxation/V1/integration/admin/token).
4. Within the request physique, choose
`form-data` and add the next key-value pairs:

`username`: Your Magento 2 admin username
`password`: Your Magento 2 admin password
5. Click on the “Ship” button to ship the request. This may return an entry token.
6. Copy the entry token from the response.

1. Set the HTTP technique to GET.
2. Set the URL to your Magento 2 base URL adopted by /relaxation/V1/retailer/storeViews.
3. Add a header with the next key-value pair:

`Authorization`: Bearer [access_token]
Exchange
`[access_token]` with the entry token you obtained within the earlier step.
d. Click on the “Ship” button to ship the request. This may retrieve the shop views info.

Redis monitor command (When you use Redis for session storage, you’ll see output just like the next)

redis-cli monitor

Session storage

redis-cli monitor
redis-cli monitor

Redis ping command

redis-cli ping

PONG must be the response.

Extra info
redis-cli command reference

That’s it! You might have now configured Redis for session administration in Magento 2 and examined it utilizing Postman. You may proceed exploring different Magento 2 REST APIs utilizing the entry token and acceptable endpoints.

author-thumb


Sushil Kumar
4 Badges

23 Could 2023

RelatedPosts

OpenAI launches new grant program for cybersecurity professionals

OpenAI launches new grant program for cybersecurity professionals

June 3, 2023
The Future Of Software Developer Teams: Remote By Default?

The Future Of Software program Developer Groups: Distant By Default?

June 3, 2023
Cortana in Windows 10

Microsoft says it’s curtains for Cortana in Home windows 11 (and 10) – however that’s no shock

June 3, 2023
Previous Post

Microsoft hopes to keep away from the errors of its previous with Home windows 11 File Explorer redesign

Next Post

2023 Apple Design Award Finalists Revealed Forward of WWDC

Next Post
2023 Apple Design Award Finalists Revealed Ahead of WWDC

2023 Apple Design Award Finalists Revealed Forward of WWDC

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • App (416)
  • Computing (216)
  • Gaming (386)
  • Home entertainment (195)
  • IOS (621)
  • Mobile (509)
  • Services & Software (258)
  • Tech (213)

Recent Posts

  • WhatsApp launches Safety Heart and redesigns its Android and iOS apps
  • Vimeo is Shutting Down TV Apps This Summer season
  • OpenAI launches new grant program for cybersecurity professionals
  • WhatsApp’s emoji keyboard redesign seems to be nearing completion
  • Telephone Hyperlink for iOS Brings iPhone Messaging to PC
  • App
  • Computing
  • Gaming
  • Home entertainment
  • IOS
  • Mobile
  • Services & Software
  • Tech
  • Home
  • About Us
  • Disclaimer
  • Contact Us
  • Terms & Conditions
  • Privacy Policy

© 2023 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • App
  • Mobile
    • IOS
  • Gaming
  • Computing
  • Tech
  • Services & Software
  • Home entertainment

© 2023 JNews - Premium WordPress news & magazine theme by Jegtheme.

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies. However you may visit Cookie Settings to provide a controlled consent.
Cookie settingsACCEPT
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
Save & Accept