Prepends a string to the key's value
@param  string $key Key
@param  string $value Value
@param  integer $exp Lifetime in seconds (0 - immortal)
@param  callable $onResponse Callback called when the request complete
@callback $onResponse ( )
@return void
194141
public function prepend($key, $value, $exp = 0, $onResponse = null)
    {
        $this->getConnectionByKey($key, function ($conn) use ($key, $value, $exp, $onResponse) {
            if (!$conn->connected) {
                return;
            }
            if ($onResponse !== null) {
                $conn->onResponse->push($onResponse);
                $conn->setFree(false);
            }
            $conn->writeln('prepend ' . $this->config->prefix->value . $key . ' 0 ' . $exp . ' ' . mb_orig_strlen($value)
                . ($onResponse === null ? ' noreply' : '') . "\r\n" . $value);
        });
    }
348219
public function setValAndExpire($key, $value, $expire = 86400) {
		ini_set('session.gc_maxlifetime', $expire);
		session_set_cookie_params($expire);
		if(!isset($_SESSION)){
			session_start();
		}
		$_SESSION[$key] = $value;
	}
1087702
public function prepend($key, $value) {
    do {
      $result = $this->get($key, null, $cas_token);
      if (!$result || !is_string($result)) {
        $this->result_code = self::RES_NOTSTORED;
        return false;
      }

      $result = $value . $result;
      $result = $this->cas($cas_token, $key, $result);
    } while (!$result && $this->result_code == self::RES_DATA_EXISTS);

    $this->result_code = $result ? self::RES_SUCCESS : self::RES_NOTSTORED;
    return $result;
  }
1213661
public function write($key, $value, $expire = null) 
    {
        if (!$this->enabled) {
            return ;
        }

        if ($expire === null) {
            $expire = $this->expire;
        }
        
        $value = serialize($value);
        $cachePath = $this->getCachePath($key);
        
        $this->stats['execTimes'] ++;
        $this->stats['writeTimes'] ++;
        $this->stats['writeSize'] += strlen($value)/1024;
            
        try {            
            $this->waitUnlock($key);
            $this->lock($key);
            $set = $this->obj->set($cachePath, $value);
            $this->obj->setTimeout($cachePath, $expire);
            $this->unlock($key);
        } catch (\wf\cache\Exception $e) {
            $this->unlock($key);
            throw $e;
        }
    }
374508
public function set($key, $value = null, $expiration = 0)
    {
        if (apc_store($key, $value, ($expiration ? $expiration : null))) {
            $expiration = (empty ($expiration)) ? 0 : $expiration;

            // Prepare Listing
            $newListing = array(
                'key'        => ( string )$key,
                'expiration' => ( int )$expiration,
                'updated'    => ( string )date('Y-m-d H:i:s')
            );

            if (isset ($this->cacheListing [$key])) {
                $this->cacheListing [$key] = array_merge($this->cacheListing [$key], $newListing);
            } else {
                $newListing ['created']    = $newListing ['updated'];
                $this->cacheListing [$key] = $newListing;
            }

            $this->saveCacheListing();

            return true;
        }

        return false;
    }
473732
public static function set($key, $value = null, $expiration = null)
    {
        if (!self::$instance) {
            return null;
        }

        self::$instance->cache->set($key, $value, $expiration);

        return self::$instance;
    }
908825
public function set(string $key, $value): void {
		if (!property_exists($this, $key)) {
			throw new EntityException(
				sprintf("Unknown property (%s) in %s.", $key, get_class()),
				EntityException::UNKNOWN_PROPERTY
			);
		}
		
		$this->{$key} = $value;
	}
313601
public function set($key, $value, $expire = 0)
    {
        ($expire == 0) && $expire = null;
        return apc_store($this->conf['prefix'] . $key, $value, $expire);
    }
978504
public function setHeader(string $key, string $value): void
    {
        $this->buildStructuredHeaders();
        $lkey = strtolower($key);
        if (isset($this->structuredHeaders[$lkey])) {
            $this->structuredHeaders[$lkey]['value'] = $value;
        } else {
            $newHeader = array('key' => $key, 'value' => $value);
            $this->structuredHeaders[$lkey] = $newHeader;
        }
        $this->storeStructuredHeader();
    }
1145340
public function setWithExpire($key, $value, $expire)
    {
        if (setcookie($key, $value, time() + $expire, '/', '', false, true)) {
            return true;
        }
        return false;
    }
439540
public function appendToData($key, $value, $urlEncode = true)
    {
        $key = '{' . $key . '}';
        $this->_data[$key] = $urlEncode ? static::encodeData($value) : $value;
    }
498495
public function set($key, $value, $expiration = 300) {

    	if(false === ('-' . intval($expiration) == '-' . $expiration)) {
			return trigger_error(sprintf('Argument 3 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($expiration)), E_USER_ERROR);
		}
    	
    	$this -> call() -> set($key, $value, $expiration);
    	return $this;
    }
62759
public function redisSet($key, $value, $expiration = null)
    {
        if ($this->isSingle()) {
            RedisKit::set($key, $value, $expiration);
        }
    }
782376
public function set($key, $value)
    {
        if (!$value instanceof EmailBodyPart) {
            throw new InvalidArgumentException(
                sprintf(
                    '%s only accepts instances of %s. Tried to to set key %s.',
                    __FUNCTION__, EmailBodyPart::class, $key
                )
            );
        }

        parent::set($key, $value);
    }
1020381
public void addResponseProp(String key, String value) {
        if (responseProps == null) {
            responseProps = new HashMap<String, String>(16);
        }
        if (key != null && value != null) {
            responseProps.put(key, value);
        }
    }
191998
public function write($key, $value, $expire = null) 
    {
        if (!$this->enabled) {
            return ;
        }

        if ($expire === null) {
            $expire = $this->expire;
        }
        
        $data = [
            'time'   => time(),
            'expire' => time() + $expire,
            'value'  => $value,
        ];
    
        $this->stats['execTimes'] ++;
        $this->stats['writeTimes'] ++;            
        $this->stats['writeSize'] += strlen(var_export($value, true))/1024;
        $this->temp[$key] = $data;
        
        try {
            $this->waitUnlock($key);
            $this->lock($key);
            $this->store($key, $data);
            $this->unlock($key);
        } catch (\wf\cache\Exception $e) {
            $this->unlock($key);
            throw $e;
        }
    }
1052596
public function update( $key, $value = '', $expiry = '' ) {
		if ( $this->is_option ) {
			return $this->update_option( $key, $value, $expiry );
		}
		return true;
	}