Jamm\Memory\APCObject::set_tags PHP Method

set_tags() public method

Associate tags with keys
public set_tags ( string $key, string | array $tags, integer $ttl = self::max_ttl ) : boolean
$key string
$tags string | array
$ttl integer
return boolean
    public function set_tags($key, $tags, $ttl = self::max_ttl)
    {
        if (!is_array($tags)) {
            if (is_scalar($tags)) {
                $tags = array($tags);
            } else {
                $tags = array();
            }
        }
        if (!empty($tags)) {
            return apc_store($this->tags_prefix . $key, $tags, intval($ttl));
        }
        return false;
    }