Skip to main content

Module codec

Module codec 

Source
Expand description

Cache value serialization with optional compression (Rails cache :compress/serializer options). Values are serialized to JSON bytes and, when requested, gzip-compressed โ€” worthwhile for large or repetitive entries.

Functionsยง

decode
Decode bytes produced by encode (must use the same compressed flag).
encode
Serialize value to JSON bytes, gzip-compressing when compress is set.