If you would like to use a custom client factory, you may do so by specifying a value in the "factory" attribute of the provider entry. The example below sets it to the default factory, but you can replace this with your own factory class to have full control over the creation and lifecycle of the Couchbase client.

This session handler also supports the ability to enable session data compression if desired. By default compression is disabled.
Note: you can't enable / disable sessions compression if your storage already contain some users session data! You need to clean up session storage before change compression mode.
You may want to enable compression of session data on client side (IIS process), if your web servers CPU capacity exceed your network or session storage performance capacity or if you want to bypass Memcached / Couchbase item size limitation of 1Mb / 20Mb correspondantly,
because compression ratio can be big enough you may store more data in sessions compared to case when you do not use session compression.
Note however that store huge amount of data in session storage usually considered as bad practice - try to make sure you keep your session data size relatively small.

You can set the value using the "compress" attribute of the provider entry.

It is also possible to select compression algorithm (starting from version 1.3.1): GZip ('gzip'), LZ4 ('lz4'), QuickLZ ('quicklz') are currently supported.
You can change it using 'compressionType' attribute of the provider entry.