Store an item in the cache indefinitely.

@param  string $key
@param  mixed $value
@param  bool $strict
@return bool
438525
public function forever($key, $value, $strict = true) {
        return $this->set($key, $value, 0, $strict);
    }
114582
public function forever($key, $value)
    {
        return (bool) $this->connection()->set($this->prefix.$key, $this->serialize($value));
    }
948675
public function where($property, $value, $strict = true)
    {
        return $this->filter(function ($object) use ($property, $value, $strict) {

            if (!array_key_exists($property, $object->settings)) {
                return false;
            }

            return $strict
                ? $object->settings[$property] === $value
                : $object->settings[$property] == $value;
        });
    }
829787
public function has($key, $strict = false)
    {
        // When $strict is true, he check $key not how a key but a value.
        $isset = isset($this->storage[$key]);

        if ($isset) {
            if ($strict === true) {
                $isset = $isset && !empty($this->storage[$key]);
            }
        }

        return $isset;
    }
713522
protected function __storeData($key, $value = null)
    {
        if (property_exists($this, $key)) {
            $this->$key = $value;
        }
        else {
            parent::__storeData($key, $value);
        }
    }
1168384
private function storeValueInCache($key, $value, $expiration = null)
    {
        $this->cache[$key] = new MemcacheObject($key, serialize($value), $this->normalizeExpirationTime($expiration));
    }
1085904
public function setStorageValue($value, $key = false) {
        $key = (!$key ? $this->name."InputResult" : $key);
        $this->getStorageContainer()->set($key, $value);
    }
271634
public function search($value, bool $strict = false)
    {
        return array_search($value, $this->storage, $strict);
    }
858983
protected function isValueTypeValid($value, $strict = false): bool
    {
        return parent::isValueTypeValid($value, $strict) ?: ($value instanceof self);
    }
338689
public function get($key, $strict = true, $default = null) {
        $value = $this->memcached->get($key);
        $resultCode = $this->memcached->getResultCode();
        if ($resultCode == \Memcached::RES_SUCCESS) {
            return $value;
        }
        if (\Memcached::RES_NOTFOUND == $resultCode) {
            if ($strict) {
                throw new CacheMissException($key);
            }
            return $default;
        }
        throw new \Exception('Memcached failed with result code ' . $resultCode);
    }
704214
public function setData( $key, $value = NULL, $strict = TRUE ){
		if( empty( $key ) )																			//  no valid data key defined
			throw new InvalidArgumentException( 'Data key is required' );							//  throw exception
		if( array_key_exists( $key, $this->data ) && $strict )										//  data key already has a value
			throw new RuntimeException( 'Data attribute "'.$key.'" is already set' );				//  throw exception
		if( !preg_match( '/^[a-z0-9:_-]+$/i', $key ) )												//  key is invalid
			throw new InvalidArgumentException( 'Invalid data key "'.$key.'"' );					//  throw exception

		if( $value === NULL || $value === FALSE ){													//  no value available
			if( array_key_exists( $key, $this->data ) )												//  data exists
				unset( $this->data[$key] );															//  remove attribute
		}
		else
		{
			if( is_string( $value ) || is_numeric( $value ) )										//  value is string or numeric
				if( preg_match( '/[^\\\]"/', $value ) )												//  detect injection
					throw new InvalidArgumentException( 'Invalid data attribute value' );			//  throw exception
			$this->attributes[$key]	= $value;														//  set attribute
		}
	}
156883
public function store($key, $value = null, int $expiration = 0): bool
    {
        return $this->set($key, $value, $expiration);
    }
501239
public function setItem($key, $value)
    {
        if (!$this->getOptions()->getEnabled()) {
            return false;
        }

        $this->normalizeKey($key);

        $result = false;
        try {
            $result = $this->internalSetItem($key, $value);
        } catch (\Exception $e) {
        }

        return $result;
    }
1215778
public static function set(string $key, $value, int $expire = null): bool
    {
        return self::storage()->set($key, $value, $expire);
    }
819237
public function search($value, $strict = false)
    {
        if (! $this->useAsCallable($value)) {
            return array_search($value, $this->items, $strict);
        }

        foreach ($this->items as $key => $item) {
            if (call_user_func($value, $item, $key)) {
                return $key;
            }
        }

        return false;
    }
170905
public function unique($key = null, $strict = false)
    {
        $callback = $this->valueRetriever($key);

        $exists = [];

        return $this->reject(function ($item, $key) use ($callback, $strict, &$exists) {
            if (in_array($id = $callback($item, $key), $exists, $strict)) {
                return true;
            }

            $exists[] = $id;
        });
    }
658878
public function put($key, $value, $duration, $localOnly = false)
    {
        $cacheKey = $this->cacheKey($key);
        if($this->keepLocalCache)
            $this->localCache[$cacheKey] = $value;
        if(!$localOnly)
            $this->cacheStore->put($cacheKey, $value, $duration);
    }