Store data in general (global cache)

@param mixed $value
@return bool
553254
public static function setCacheGeneral($value)
    {
        $cache = self::getCache();

        return $cache->save(self::$cacheIdGeneral, $value, self::getTtl());
    }
332186
public function CacheLevel($value = null)
	{
		if ($value != null) $this->_cacheLevel = $value;
		return $this->_cacheLevel;
	}
158414
public function store(array $values)
    {
        foreach ($values as $key=>$value)
        {
            // Ensure proper type
            $value = $this->forceTypes($value);

            // Json to save
            $jsonValue = json_encode($value);

            // Update
            $this->database->statement("INSERT INTO system_registries ( `key`, `value` ) VALUES ( ?, ? )
										ON DUPLICATE KEY UPDATE `key` = ?, `value` = ?",
                array($key, $jsonValue, $key, $jsonValue));

            $this->cache->add($key, $value);
        }

        return true;
    }
1273927
protected function loadGlobals($value) {
        $enabled = false;                                           // default
        if (is_bool($value) || is_int($value)) {
            $enabled = (bool) $value;
        }
        elseif (is_string($value)) {
            $value   = trim(strtolower($value));
            $enabled = ($value=='1' || $value=='on' || $value=='true');
        }
        if ($enabled && !function_exists('booltostr')) {            // prevent multiple includes
            include(MINISTRUTS_ROOT.'/src/globals.php');
        }
    }
327211
public function setFirst(string ...$value) : bool
        {
                return $this->_redis->lpush($this->_key, $value) > 0 ? true : false;
        }
1161264
protected function unserialize($value)
    {
        if ($this->connection instanceof PostgresConnection && ! Str::contains($value, [':', ';'])) {
            $value = base64_decode($value);
        }

        return unserialize($value);
    }
514226
function setValue( $value )
    {
        $this->Value = $value;
        if ( $value instanceof ggWebservicesFault || $value instanceof eZSOAPFault )
        {
            $this->IsFault = true;
            $this->FaultCode = $value->faultCode();
            $this->FaultString = $value->faultString();
        }
        else
        {
            $this->IsFault = false;
        }
    }
468889
static public function isToday($value)
    {
        $time = DataHelper::toUnixtime($value);
        $todayRange = static::todayRange();
        
        if ($time >= $todayRange[0] && $time <= $todayRange[1]) {
            return true;
        }
        return false;
    }
1295699
protected static function unserialize($value)
    {
        @trigger_error(sprintf('The "%s::unserialize()" method is deprecated since Symfony 4.2, use DefaultMarshaller instead.', __CLASS__), E_USER_DEPRECATED);

        if ('b:0;' === $value) {
            return false;
        }
        $unserializeCallbackHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback');
        try {
            if (false !== $value = unserialize($value)) {
                return $value;
            }
            throw new \DomainException('Failed to unserialize cached value');
        } catch (\Error $e) {
            throw new \ErrorException($e->getMessage(), $e->getCode(), E_ERROR, $e->getFile(), $e->getLine());
        } finally {
            ini_set('unserialize_callback_func', $unserializeCallbackHandler);
        }
    }
1260772
protected function storeInCache($name, $value, SettingsOwnerInterface $owner = null)
    {
        $item = $this->storage->getItem($this->getCacheKey($name, $owner))
            ->set($value)
            ->expiresAfter($this->cacheLifeTime);

        return $this->storage->save($item);
    }
140371
public static function put( $name = '', $value = '' ) {

		if ( ! empty( $value ) ) {
			$GLOBALS['_PUT'][ $name ] = $value;
		}

		if ( empty( $name ) ) {
			return ( isset( $GLOBALS['_PUT'] ) ) ? $GLOBALS['_PUT'] : NULL;
		} else {
			return ( isset( $GLOBALS['_PUT'][ $name ] ) ) ? $GLOBALS['_PUT'][ $name ] : NULL;
		}

	}
1338589
protected function setCachedValue($key, $value)
    {
        $this->cache->setPrefix($this->dataProvider->getCachePrefix());
        return $this->cache->set($key, $value);
    }
1153151
public function setCoreCacheDbSessionLifetime($value)
    {
        $this->setFieldName('cache_db_session_lifetime');
        $this->loadObject(true);
        $this->setFieldValue($value);

        return $this;
    }
606259
public function setValue($value = null)
    {
        if ($value && !($value instanceof \Countable && 0 === count($value))) { // empty or empty collection
            // store into temporary variable
            $this->entityData = $value;

            // store into database format
            if (is_array($value) || $value instanceof \ArrayAccess) {
                // this is the case if multiple = true
                $saveValue = array();
                $saveClass = null;
                foreach ($value as $val) {
                    $saveValue[] = $val->getId();
                    $saveClass = ClassUtils::getClass($val); // only the last class type is stored. We assume that it's the same anyway
                }
            } else {
                // this is the case if multiple = false
                $saveValue = $value->getId();
                $saveClass = ClassUtils::getClass($value);
            }
            if ($saveClass) {
                $this->entityValue = array(
                    'entityClass' => $saveClass,
                    'entityId' => $saveValue,
                );
            } else {
                $this->entityValue = null;
            }
        } else {
            $this->entityValue = null;
            $this->entityData = null;
        }

        return $this;
    }
1110476
public function store() {
        if (function_exists('igbinary_serialize')) {
            $s = @igbinary_serialize($this);
        } else {
            $s = @serialize($this);
        }
        if ($s) {
            $_SESSION[ self::SESSION_NAME . '_' . $this->type ] = $s;
        }

        return $s ? true : false;
    }
1171794
public function unserialize($value)
    {
        if (\is_array($value) && isset($value[self::SCALAR_TYPE])) {
            return $this->unserializeData($value);
        }

        $this->reset();

        return $this->unserializeData($this->serializationStrategy->unserialize($value));
    }
333327
public function setCoreCacheContextSettings($value)
    {
        $this->setFieldName('cache_context_settings');
        $this->loadObject(true);
        $this->setFieldValue($value);

        return $this;
    }