public function user($id = null)
    {
        if ($this->allCleared === true || $this->isSwitchedOff()) {
            return;
        }

        if ($id === null) {
            // @todo From the looks of usage in legacy we only need to clear meta data here, and there is no such thing
            // in persistence so we ignore it for now.
            //$this->cache->clear();
        } elseif (is_scalar($id)) {
            $this->cache->invalidateTags(['user-' . $id]);
        } else {
            throw new InvalidArgumentType('$id', 'int|null', $id);
        }
    }
public function user($id = null)
    {
        if ($this->allCleared === true || $this->isSwitchedOff()) {
            return;
        }

        if ($id === null) {
            // @todo From the looks of usage in legacy we only need to clear meta data here, and there is no such thing
            // in persistence so we ignore it for now.
            //$this->cache->clear();
        } elseif (is_scalar($id)) {
            $this->cache->invalidateTags(['user-' . $id]);
        } else {
            throw new InvalidArgumentType('$id', 'int|null', $id);
        }
    }
public function user ( $ id = null ) { if ( $ this -> allCleared === true || $ this -> isSwitchedOff ( ) ) { return ; } if ( $ id === null ) { // @todo From the looks of usage in legacy we only need to clear meta data here, and there is no such thing // in persistence so we ignore it for now. //$this->cache->clear(); } elseif ( is_scalar ( $ id ) ) { $ this -> cache -> invalidateTags ( [ 'user-' . $ id ] ) ; } else { throw new InvalidArgumentType ( '$id' , 'int|null' , $ id ) ; } }
Clear meta info on users in Persistence.

In legacy kernel used when clearing meta info cache on users in eZUser, never with id.

@param int|null $id Purges all users cache if null
@throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentType On invalid $id type
Clear meta info on users in Persistence .