How to extend remember_me cookie for each request in Symfony2?

I use the standard remember_mesymfony function , but it expires every period of time set in config. For instance. I have it lifetimeset to 1800. In addition to what I do, it disconnects me 0.5 hours after the last login. And I want him to disconnect me only after 0.5 hours of inactivity.

Each request should renew, remember me, cookie.

Can this be done with just configuration, or do I need to tinker with kernel events and manually hack it?

+1
source share
1 answer

, Symfony 2.1. , PHP. .

config.yml :

framework:
  session:
    cookie_lifetime: 86400 # One day, cookie lifetime
    gc_maxlifetime: 1800 # 30 minutes, session lifetime
    gc_probability: 5
    gc_divisor: 100

cookie, , . 30 . , "" . , .

. "" , . gc_probability gc_divisor , . , GC 5% (5/100, gc_probability/gc_divisor) .

, GC , . , , . , GC .

, , - . , , , .

, Symfony 2.1. 2.0 .

:

, .

, Matt

+4

All Articles