/**
  * 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]);
 }
 /**
  * Decodes given value into the on-memory instance in accordance with
  * the predefined codec.
  *
  * @param  array $value value to be decoded.
  * @return mixed instance which is decoded.
  */
 public function decodeAny($value)
 {
     return $this->coder->decode($value);
 }