mirror of
https://github.com/phpredis/phpredis.git
synced 2026-06-19 07:35:31 +00:00
Add compression support for PHP Sessions (#2473)
* Add compression support for PHP Sessions Previously, compression was available for standard data but not for session handling. This update enables the compression of PHP sessions, allowing for more efficient Redis memory usage. * Move session compress/uncompress logic to helper functions * Change session_compress_data to always set the out arguments and adjust PS_READ_FUNC
This commit is contained in:
@@ -118,6 +118,16 @@ redis.session.lock_wait_time = 50000
|
||||
redis.session.lock_retries = 2000
|
||||
~~~
|
||||
|
||||
### Session compression
|
||||
|
||||
Following INI variables can be used to configure session compression:
|
||||
~~~
|
||||
; Should session compression be enabled? Possible values are zstd, lzf, lz4, none. Defaults to: none
|
||||
redis.session.compression = zstd
|
||||
; What compression level should be used? Compression level depends on used library. For most deployments range 1-9 should be fine. Defaults to: 3
|
||||
redis.session.compression_level = 3
|
||||
~~~
|
||||
|
||||
## Running the unit tests
|
||||
|
||||
phpredis uses a small custom unit test suite for testing functionality of the various classes. To run tests, simply do the following:
|
||||
|
||||
Reference in New Issue
Block a user