Puts data into the cache.

@param string $id   The cache id.
@param mixed  $data The cache entry/data.

@return bool TRUE if the entry was successfully stored in the cache, FALSE otherwise.
4906
public function save($id, $data, $ttl = 20)
    {
        if ($this->businessEntityDebug) {
            parent::save($id, $data, $ttl);
        } else {
            parent::save($id, $data);
        }
    }
1000123
public function write($id, $data)
    {
        $access = time();
        $this->session_id = (string) $id;
        $this->access = $access;
        $this->data = $data;
        $this->save();

        return true;
    }
418785
public function write($id, $data)
    {
        $data = [
            $this->options['data_col'] => $data,
            $this->options['time_col'] => (int) time(),
            $this->options['id_col'] => $id,
        ];

        $data = (object) $data;

        $this->db->updateObject($this->options['table'], $data, $this->options['id_col']);

        if ($this->db->getAffectedRows()) {
            return true;
        }

        $this->db->insertObject($this->options['table'], $data, $this->options['id_col']);

        return true;
    }
272368
public function save($data, $id)
    {
        try
        {
            if($this->automaticSerialization)
            {
                $data = serialize($data);
            }
            
            return $this->adapter->setItem($id, $data);
        }
        catch(\Zend\Cache\Exception\ExceptionInterface $e)
        {
            $this->wrapLowLevelException($e, __METHOD__);
        }
    }
32222
public function write($id, $data): bool
    {
        DB::table('session')->updateOrInsert([
            'session_id' => $id,
        ], [
            'session_time' => Carbon::now(),
            'user_id'      => (int) Auth::id(),
            'ip_address'   => $this->request->getServerParams()['REMOTE_ADDR'] ?? '127.0.0.1',
            'session_data' => $data,
        ]);

        return true;
    }
530482
public function save( $id, $data, $ttl = 0 ) {
		foreach ( $this->caches as $cache ) {
			$cache->save( $id, $data, $ttl );
		}
	}
611688
public function store($id, $data)
    {
        $flag = $this->locking ? LOCK_EX : null;
        $file = $this->path . '/' . $id;

        if (! @file_put_contents($file, $data, $flag)) {
            $this->logger->warning("Minify_Cache_File: Write failed to '$file'");
        }

        // write control
        if ($data !== $this->fetch($id)) {
            @unlink($file);
            $this->logger->warning("Minify_Cache_File: Post-write read failed for '$file'");

            return false;
        }

        return true;
    }
170133
public function set($id, $data, $lifeTime = 0)
    {
        if ($lifeTime > (int) 2592000) {
            $lifeTime = time() + $lifeTime;
        }

        return $this->memcache->add($id, $data, CacheFlags::CACHE_COMPRESSED, (int) $lifeTime);
    }
1126946
function read($id) {
		if ($id!=$this->sid)
			$this->sid=$id;
		return Cache::instance()->exists($id.'.@',$data)?$data['data']:FALSE;
	}
1280029
public function save( $id, $data, $ttl = 0 ) {

		$options = $this->cache->getOptions();
		$oldTtl  = $options->getTtl( $ttl );
		$options->setTtl( $ttl );

		try {
			$this->cacheInserts++;
			$this->cache->setItem( $id, $data );
		} catch ( \Exception $e ) {
			// Don't re-throw any exception, the consumer
			// should not care about this
			$this->cacheInserts--;
		}

		$options->setTtl( $oldTtl );
	}
1166206
protected function doSave($id, $data, $lifeTime = false)
    {
        if (!$lifeTime) {
            $this->cache->forever($id, $data);
        } else {
            $this->cache->put($id, $data, $lifeTime);
        }

        return true;
    }
579512
public function write($id, $data)
    {
        $writer = $this->db->getWriter();

        $data = [
            $this->options['data_col'] => $data,
            $this->options['time_col'] => (int) time(),
            $this->options['id_col'] => $id,
        ];

        $writer->updateOne($this->options['table'], $data, $this->options['id_col']);

        if ($writer->countAffected()) {
            return true;
        }

        $writer->insertOne($this->options['table'], $data, $this->options['id_col']);

        return true;
    }
464531
public function update($id, array $data)
    {
        $data = $this->resolverFactory->createAppResolver()->resolve($data);

        return $this->api->request('PUT', '/apps/'.$id, [
            'Authorization' => 'Basic '.$this->api->getConfig()->getUserAuthKey(),
        ], json_encode($data));
    }
443246
public function write($id, $data)
    {
        $data = base64_encode($data);
        $data = array(
            $this->options->getModifiedColumn() => time(),
            $this->options->getDataColumn()     => (string) $data,
        );

        $rows = $this->tableGateway->select(array(
            $this->options->getIdColumn()   => $id,
            $this->options->getNameColumn() => $this->sessionName,
        ));

        if ($row = $rows->current()) {
            return (bool) $this->tableGateway->update($data, array(
                $this->options->getIdColumn()   => $id,
                $this->options->getNameColumn() => $this->sessionName,
            ));
        }
        $data[$this->options->getLifetimeColumn()] = $this->lifetime;
        $data[$this->options->getIdColumn()]       = $id;
        $data[$this->options->getNameColumn()]     = $this->sessionName;

        return (bool) $this->tableGateway->insert($data);
    }
1185502
public function update($id, array $data)
    {
        $this->validateId($id);

        $entity = $this->getById($id);
        $form   = $this->getEditForm();

        $form->bind($entity);
        $form->setData($data);

        if (!$valid = $form->isValid()) {
            return false;
        }

        $this->updateFromNode($entity);

        $this->getMapper()->save($entity);

        return $entity;
    }
1169713
public function store($id, $data = array())
    {
        try {

            if (empty($id)) {
                throw new StorageException('Invalid id parameter.');
            }
            $this->persistence = $this->getPersistence();

            $data = $this->cleanInputData($data);
            if (!$this->exists($id)) {
                $this->insert($id, $data);
            } else {
                $this->update($id, $data);
            }
            return true;

        } catch (\PDOException $e) {
            throw new StorageException($e->getMessage());
        }
    }
667209
public function save($id, $data, $lifeTime = 0)
    {
        $item = $this->cache->getItem((string) $id);
        $item->set($data);

        if ($lifeTime > 0) {
            $item->expiresAfter($lifeTime);
        }

        return $this->cache->save($item);
    }