src/mako/cache/stores/Store.php
public function getAndPut(string $key, $data, int $ttl = 0)
	{
		$storedValue = $this->get($key);

		$this->put($key, $data, $ttl);

		return $storedValue;
	}
public function getAndPut(string $key, $data, int $ttl = 0)
	{
		$storedValue = $this->get($key);

		$this->put($key, $data, $ttl);

		return $storedValue;
	}
public function getAndPut ( string $ key , $ data , int $ ttl = 0 ) { $ storedValue = $ this -> get ( $ key ) ; $ this -> put ( $ key , $ data , $ ttl ) ; return $ storedValue ; }
Fetch data from the cache and replace it.

@param  string $key  Cache key
@param  mixed  $data The data to store
@param  int    $ttl  Time to live
@return mixed
Fetch data from the cache and replace it .