Add cluster support for strict sessions and lazy write

* Add ini setting redis.session.early_refresh to allow for session TTL updates on session start ( requires redis server version 6.2 or greater )
 * Enable cluster session support for strict mode sessions ( via PS_VALIDATE_SID_FUNC )
 * Cluster sessions used to write on every session, now we only write if the session has been modified.
 * Send EXPIRE instead of SETEX if sessioh has not been changed
 * If early refresh is enabled use GETEX for initial session read
 * When strict sessions are enabled, check whether the session exists first, validate sid and regenerate if necessary
This commit is contained in:
zorro-fr24
2022-11-18 19:05:20 +01:00
committed by Michael Grunder
parent 79c9d2241f
commit b6cf6361dd
4 changed files with 185 additions and 4 deletions

View File

@@ -20,6 +20,9 @@ PS_READ_FUNC(rediscluster);
PS_WRITE_FUNC(rediscluster);
PS_DESTROY_FUNC(rediscluster);
PS_GC_FUNC(rediscluster);
PS_CREATE_SID_FUNC(rediscluster);
PS_VALIDATE_SID_FUNC(rediscluster);
PS_UPDATE_TIMESTAMP_FUNC(rediscluster);
#endif
#endif