public function set($id, $data, $lifetime = null, $tags = null) {
		$backend = $this->getBackend();
		
		if ($tags !== null) {
			if (! $backend instanceof TaggableInterface) {
				throw new NoTagsSupported('Unable to set the data with the tag(s) due to a tags does not supported by the backend "' . get_class($backend) . '"');
			}
			
			if (is_array($tags)) {
				$tags = array_map([$this, 'prepareId'], $tags);
			} else {
				$tags = $this->prepareId($tags);
			}
		}
		
		$id = $this->prepareId($id);
		
		if ($lifetime === null) {
			$lifetime = $this->_defaultLifetime;
		}
		
		return $backend->set($id, $data, $lifetime, $tags);
	}
public function set($id, $data, $lifetime = null, $tags = null) {
		$backend = $this->getBackend();
		
		if ($tags !== null) {
			if (! $backend instanceof TaggableInterface) {
				throw new NoTagsSupported('Unable to set the data with the tag(s) due to a tags does not supported by the backend "' . get_class($backend) . '"');
			}
			
			if (is_array($tags)) {
				$tags = array_map([$this, 'prepareId'], $tags);
			} else {
				$tags = $this->prepareId($tags);
			}
		}
		
		$id = $this->prepareId($id);
		
		if ($lifetime === null) {
			$lifetime = $this->_defaultLifetime;
		}
		
		return $backend->set($id, $data, $lifetime, $tags);
	}
public function set ( $ id , $ data , $ lifetime = null , $ tags = null ) { $ backend = $ this -> getBackend ( ) ; if ( $ tags !== null ) { if ( ! $ backend instanceof TaggableInterface ) { throw new NoTagsSupported ( 'Unable to set the data with the tag(s) due to a tags does not supported by the backend "' . get_class ( $ backend ) . '"' ) ; } if ( is_array ( $ tags ) ) { $ tags = array_map ( [ $ this , 'prepareId' ] , $ tags ) ; } else { $ tags = $ this -> prepareId ( $ tags ) ; } } $ id = $ this -> prepareId ( $ id ) ; if ( $ lifetime === null ) { $ lifetime = $ this -> _defaultLifetime ; } return $ backend -> set ( $ id , $ data , $ lifetime , $ tags ) ; }
Store the data

@param  string         $id
@param  mixed          $data
@param  int            $lifetime seconds
@param  string | array $tags
@return bool
@throws NoTagsSupported
Store the data