I want to extend the length of a guest's cart and have had no luck finding an answer that takes into account user activity. I've done some digging and this is how I think a cart expires for a guest user:
session_start()
is called by Magento\Framework\Session\SessionManager
The session itself lasts at least as long as php's session.gc_maxlifetime
setting. The session can be stored longer depending on other settings which I don't need to go into.
The session cookie lifetime, default PHPSESSID
, uses the default value of 3600 seconds. This can be changed in admin, although the cookie does not seem to get reset on each page visit by default. This means the cart will expire in 1 hour no matter what.
The question I have is, how can I reset the cookie expiration so that an active user doesn't have their session deleted? Essentially doing what this answer suggests, but in Magento as a module.