Previously the compress option only takes effect on react/cache interface, this PR allows other.
However it is not compatible with Symfony cache since the serialization takes place after this library serliazer(), it is however still possible to compress data by using the DeflateMarshaller from the Symfony class, and this library $compress option must be set to false, so added the warning PHP Notice: Symfony cache is not compatible with option $compress = true, Use the DeflateMarshaller to compress data! in D:\Data\DiscordPHP\src\Discord\Helpers\CacheConfig.php on line 71.
Example:
$cache = new CacheConfig(new Psr16Cache(new RedisAdapter($redis, 'dphp', 0, new DeflateMarshaller(new DefaultMarshaller()))), compress: false);
Previously the compress option only takes effect on react/cache interface, this PR allows other.
However it is not compatible with Symfony cache since the serialization takes place after this library
serliazer()
, it is however still possible to compress data by using theDeflateMarshaller
from the Symfony class, and this library$compress
option must be set tofalse
, so added the warningPHP Notice: Symfony cache is not compatible with option $compress = true, Use the DeflateMarshaller to compress data! in D:\Data\DiscordPHP\src\Discord\Helpers\CacheConfig.php on line 71
. Example:Tested.