Closed ilevd closed 2 years ago
Try to write to Redis with lz4-compressor, found this way:
(defn write-cache [key val] (car/wcar redis (car/set key (WrappedForFreezing. val {:compressor taoensso.nippy/lz4-compressor}))))
it would be better to set compressor with *freeze-opts*:
*freeze-opts*
(defn write-cache [key val] (binding [taoensso.nippy.tools/*freeze-opts* {:compressor taoensso.nippy/lz4-compressor}] (car/wcar redis (car/set key val))))
but it doesn't work, cause there is no merge with *freeze-opts* if the value isn't WrappedForFreezing in https://github.com/ptaoussanis/nippy/blob/master/src/taoensso/nippy/tools.clj#L36
WrappedForFreezing
Shouldn't merge with *freeze-opts* be there too? Btw, is there completely another way to set compressor properly (maybe in carmime)?
@ilevd Hi Igor, thanks for the report! This is indeed a bug (unintended behaviour), will be fixed in next release later today.
Try to write to Redis with lz4-compressor, found this way:
it would be better to set compressor with
*freeze-opts*
:but it doesn't work, cause there is no merge with
*freeze-opts*
if the value isn'tWrappedForFreezing
in https://github.com/ptaoussanis/nippy/blob/master/src/taoensso/nippy/tools.clj#L36Shouldn't merge with
*freeze-opts*
be there too? Btw, is there completely another way to set compressor properly (maybe in carmime)?