6
votes
Accepted
When to truncate the core_session table?
The only reason to truncate this table is if you change the session storage so that you don't need the table anymore. That is, after migrating sessions to redis, files or whatever.
It's the ...
4
votes
\Magento\Backend\Model\Session Clear: Magento 2
I believe the method you are looking for in Magento 2 is destroy().
Take a look at the following class Magento\Backend\Model\Session it extends \Magento\Framework\Session\SessionManager which has ...
3
votes
\Magento\Backend\Model\Session Clear: Magento 2
For frontend,
protected $session;
public function __construct(
\Magento\Framework\Session\SessionManagerInterface $session
) {
$this->session = $session;
}
//Unset all session data front
...
2
votes
Session Cookie Management - Cookie Lifetime
if the longer lifetime could cause problems depends on the amount of people going to your website and so creating new sessions.
db has the advantage, that you can have the sessions distributed ...
2
votes
How to get session value in frontend?
Although I am not sure if it is feasible to do this way since magento frontend and admin are separate.
However, Alan has wrote one nice extension for us.
https://github.com/astorm/...
2
votes
Magento 1.9.3.6 session validation exception issue
You have a similar issue than this one:
https://magento.stackexchange.com/a/167834/17293
Try to to add
return true;
before
if ($this->useValidateSessionExpire()
in the file app/code/core/...
1
vote
Accepted
Loging on frontend failed with no errors
I think issue is regarding session, by default session store in files in Magento, you can try to change it to DB for your local instance and try if your problem resolve or not. You can change session ...
1
vote
When to truncate the core_session table?
Why not remove session records older than some time e.g. 1 week. This way you keep recent login/sessions/carts.
DELETE FROM `session` WHERE session_expires < UNIX_TIMESTAMP(DATE_SUB(NOW(), ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
sessions × 29magento2 × 6
customer-session × 5
login × 4
magento-1.9 × 3
cookie × 3
magento-1.8 × 2
redis × 2
memcached × 2
checkoutsession × 2
magento-2.1 × 1
magento2.3 × 1
checkout × 1
database × 1
magento2.2 × 1
event-observer × 1
customer × 1
product-attribute × 1
adminhtml × 1
magento-enterprise × 1
cache × 1
cron × 1
customer-account × 1
ajax × 1
model × 1