Set/get values from the local cache
@param string $key   Lookup key
@param mixed  $value Value to store
@return \Reflex\Roles\RoleTraits
977343
protected function cache($key, $value = null)
    {
        if (is_null($value) && $this->cacheHas($key)) {
            array_forget($this->cache, $key);
            return null;
        }

        if (is_null($value)) {
            return array_get($this->cache, $key, false);
        }

        if (! is_bool($value)) {
            $value  =   false;
        }

        array_set($this->cache, $key, $value);

        return $value;
    }
116275
public function set($key, $value)
    {
        return shm_put_var($this->shm, $this->shm_key($key), $value); //store var
    }
290020
public function set($key, $value)
	{
		Arr::set($this->body, $key, $value);

		return $this;
	}
950620
public function set( $key, $value )
	{
		return $this->store->set( $key, $value, 0, $this->expires );
	}
733568
public function setGet($key, $value)
    {
        $this->_GET = Hash::insert($this->_GET, $key, $value);
    }
1151604
public function withEntry(string $key, $value): self
    {
        $this->bindings[$key] = $this->getValueCreator($value);
        return $this;
    }
618983
public function withValue($key, $value)
    {
        $copy = $this->values;
        $copy[$key] = $value;
        return new Context($copy);
    }
740681
public function setValueByKey($key, $value)
    {
        $model = Configuration::whereConfigurationKey($key)->first();

        if (null === $model) {
            return null;
        }
        $model->update(['configuration_value' => $value]);

        return $model;
    }
429846
public function set($key, $value = null)
    {
        if( is_array($key) ) {
            $this->values($key);
        } else {
            $this->value($key, $value);
        }
        return $this;
    }
71646
public function set($key, $value)
    {
        $registry = ArrayHelper::set($this->getItems(), $key, $value, $useDotSyntax = true);
        $this->setItems($registry);

        return $this->getItems();
    }
1365736
public function bind($key, $value = null)
    {
        if (is_array($key))
        {
            foreach ($key as $name => $value)
            {
                $this->_bound[$name] = $value;
            }
        }
        else
        {
            $this->_bound[$key] = $value;
        }

        return $this;
    }
974531
public function set($key, $value = null)
    {
        if ($key === null) {
            array_push($this->storage, $value);

            return $this;
        }

        if (is_array($key)) {
            foreach ($key as $key => $value) {
                $this->storage[$key] = $value;
            }

            return $this;
        }

        $this->setValueToStack($this->storage, explode(self::SEPARATOR, $key), $value);

        return $this;
    }
163337
function set($key, $value, $expire = 0)
    {
        if ($this->memcached)
        {
            return $this->cache->set($key, $value, $expire);
        }
        else
        {
            return $this->cache->set($key, $value, $this->flags, $expire);
        }
    }
314852
public function setDataToAll($key, $value = null)
    {
        if (is_array($key)) {
            foreach ($key as $k => $v) {
                $this->setDataToAll($k, $v);
            }
            return $this;
        }

        foreach ($this->getItems() as $item) {
            /** @var Aoe_Scheduler_Model_Job $item */
            $item->setDataUsingMethod($key, $value);
        }

        return $this;
    }
1130152
public function offsetSet($key, $value)
    {
        if ($key !== null) {
            $this->data[$key] = $value;
        } else {
            $this->data[] = $value;
        }

        return $this;
    }
185992
public function set($key, $value)
    {
        $path = $this->getPath($key);
        $data = $this->getFromCache();
        $node = &$data;
        $cnt  = count($path) - 1;

        for ($ii=0; $ii<=count($path); $ii++) {
            if ($ii == $cnt) {
                $node[$path[$ii]] = $value;
                break;
            } elseif (!array_key_exists($path[$ii], $node)) {
                $node[$path[$ii]] = [];
            }
            if (!is_array($node[$path[$ii]])) {
                $node[$path[$ii]] = [];
            }

            $node = &$node[$path[$ii]];
        }

        $this->setToCache($data);

        return $this;
    }
734781
public function set(string $key, $value): Definition
    {
        $this->data[$key] = $value;

        return $this;
    }