Retrieve an item from the cache by key.

@param  string|array  $key
@return mixed
546166
public function get($key, $default = null)
    {
        if (! $key || ! is_string($key)) {
            throw new InvalidArgumentException('Invalid cache key');
        }

        $transientKey = $this->generateTransientKey($key);
        $cached = get_transient($transientKey);

        return ($cached !== false ? $cached : $default);
    }
1350821
public function get($key)
    {
        $prefixed = $this->prefix.$key;

        $cache = $this->table()->where('key', '=', $prefixed)->first();

        // If we have a cache record we will check the expiration time against current
        // time on the system and see if the record has expired. If it has, we will
        // remove the records from the database table so it isn't returned again.
        if (is_null($cache)) {
            return;
        }

        $cache = is_array($cache) ? (object) $cache : $cache;

        // If this cache expiration date is past the current time, we will remove this
        // item from the cache. Then we will return a null value since the cache is
        // expired. We will use "Carbon" to make this comparison with the column.
        if (Carbon::now()->getTimestamp() >= $cache->expiration) {
            $this->forget($key);

            return;
        }

        return unserialize($cache->value);
    }
168433
public function get($key){

		if(!is_null($this->args))
			if(in_array($key, array_keys($this->args)))
				return $this->args[$key];

		return null;
	}
1073655
public function get(string $key)
    {
        if ($this->enabled === false) {
            return null;
        }

        $index = $this->cacheIndex[$key] ?? $key;
        if (!isset($this->cache[$index]) || $this->cacheExpiryTime[$index] < microtime(true)) {
            return null;
        }

        ++$this->cacheAccessCount[$index];

        return $this->cache[$index];
    }
1029468
public function getItem($key)
    {
        $this->validateKey($key);

        if ($this->hasItem($key)) {
            $data = file_get_contents($this->getPath($key));
            if ($data !== false) {
                $item = unserialize($data, [
                    "allowed_classes" => true,
                ]);

                if (!$item instanceof CacheItemInterface) {
                    throw new CacheException("Unexpected object during deserialization: " . get_class($item));
                }

                return $item;
            }
        }

        # If we didn't find a suitable item then create a new one now
        return new Item($key);
    }
712758
public function getFromCache($key)
  {
    $file = $this->cachePath . $this->getEncodedKey($key);
    if (file_exists($file)) {
      return unserialize(file_get_contents($file));
    }
    return null;
  }
1360512
public function pull($key)
    {
        $item = $this->get($key);

        $this->remove($key);

        return $item;
    }
190290
public function get($key)
    {
        $items = Arr::get($this->items, $key);

        return $this->firstOrAll($items);
    }
267383
public function get($key)
	{
		$this->connect();
		$value = $this->driver->get($key);
		$code = $this->driver->getResultCode();
		$item = new Item($key);

		if ($code === \Memcached::RES_SUCCESS)
		{
			$item->setValue($value);
		}

		return $item;
	}
694985
public function get($key)
	{
		$item = new Item($key);

		if ($this->exists($key))
		{
			$item->setValue(xcache_get($key));
		}

		return $item;
	}
605360
private function getFromCacheByKey($key)
    {
        if ( ! $this->cache->contains($key)) {
            return null;
        }

        $serialized = $this->cache->fetch($key);

        return $this->unserializeAcl($serialized);
    }
567001
public function get($key) {
		$data = CacheFactory::getCache()->get($key);
		if ($data && isset($data['__fsm'])) {
			$modelName = empty($data['__fsm']['m']) ? '' : 'App\\Model\\'.ucfirst($data['__fsm']['m']);
			$isArray = intval($data['__fsm']['a']);
			if ($isArray == 1) {
				$ma = new ModelArray();
				foreach ($data['data'] as $item) {
					$model = new $modelName();
					$model->fromArray($item);
					$ma[] = $model;
				}
				$data = $ma;
			} else {
				$model = new $modelName();
				$data = $model->fromArray($data['data']);
			}
		}
		return $data;
	}
1217973
public function get($key)
    {
        $cache_data = $this->getItem($key);
        if ($cache_data === false || !is_array($cache_data)) {
            return false;
        }

        return $cache_data['data'];
    }
772387
public function get($key = '')
    {
        try {
            if ($this->cacheInstance !== NULL && is_object($this->cacheInstance)) {
                /**
                 * @var $cache object
                 */
                if (is_array($key)) {
                    $cache = $this->cacheInstance->getItems($key);
                } else {
                    $cache = $this->cacheInstance->getItem($key);
                }
                if (!$cache->isHit()) {
                    $result = NULL;
                    $this->debug->debug(__FUNCTION__, 'Unavailable Cache for Key: ' . $key);
                } else {
                    $result = $cache->get();
                    $this->debug->debug(__FUNCTION__, 'Get Cache from Key: ' . $key . ', result: ' . json_encode($result));
                }
                $message = 'Final get Content from Key: ' . $key . ' => Output result: ' . json_encode($result);
                $this->debug->info(__FUNCTION__, $message);

                return $result;
            } else {
                $this->debug->error(__FUNCTION__, 'Unavailable cacheInstance');

                return NULL;
            }
        }
        catch (\Exception $e) {
            $message = 'Error File: ' . $e->getFile() . ' - Line: ' . $e->getLine() . ' - Code: ' . $e->getCode() . ' - Message: ' . $e->getMessage();
            $this->debug->error(__FUNCTION__, $message);

            return $message;
        }
    }
763138
protected function retrieve($key)
    {
        if (!is_null($cache = $this->redis->get($key))) {
            return unserialize($cache);
        }

        return null;
    }
1346148
public function getItem($key): CacheItem
    {
        if (isset($this->data[$key])) {
            return $this->data[$key];
        }

        $cacheItem = new CacheItem($key);

        if ($this->has($key)) {
            $cacheItem->set($this->get($key));
        }

        $this->data[$key] = $cacheItem;

        return $cacheItem;
    }
337863
protected function retrieve($key)
    {
        if (($cache = $this->memcache->get($this->key . $key)) !== false) {
            return $cache;
        }

        return null;
    }