Beispiel #1
0
 public function set($id, $value, $group = Cache::DEFAULT_GROUP, $ttl = Cache::DEFAULT_TTL)
 {
     $this->cache[$group][$id] = Str::maybeSerialize($value);
 }
Beispiel #2
0
/**
 * Serialize data, if needed.
 *
 * @param mixed $data Data that might be serialized.
 * @return mixed A scalar data
 */
function maybe_serialize($data)
{
    return \Phpf\Util\Str::maybeSerialize($data);
}