/**
  * Prepares data to be sent to the cache server.
  *
  * @oaram mixed $data    data to be serialized.
  * @oaram int   $minutes expiration duration in minutes.
  * @param array|string   serialized data.
  */
 public function serialize($data, $minutes = null)
 {
     return DefaultRecord::marshalize(['data' => $this->coder->encode($data)]);
 }
 /**
  * Prepares data to be sent to the cache server.
  *
  * @oaram mixed $data    data to be serialized.
  * @oaram int   $minutes expiration duration in minutes.
  * @param array|string   serialized data.
  */
 public function serialize($data, $minutes = null)
 {
     $ttl = is_null($minutes) ? null : Time::getTTL($minutes);
     return VolatileRecord::marshalize(['data' => $this->coder->encode($data), 'ttl' => $ttl]);
 }
 /**
  * Encodes given value into the serialized codes in accordance with
  * the predefined codec.
  *
  * @param  mixed $value value to be encoded.
  * @return array array of the encoded strings.
  */
 public function encodeAny($value)
 {
     return $this->coder->encode($value);
 }