src/Util/ApiLoader.php
protected function setToCache($cacheKey, $value, $ttl = null)
    {
        // Seralize as JSON to ensure array etc can be stored
        $value = Convert::raw2json($value);

        return $this->getCache()->set($cacheKey, $value, $ttl);
    }
protected function setToCache($cacheKey, $value, $ttl = null)
    {
        // Seralize as JSON to ensure array etc can be stored
        $value = Convert::raw2json($value);

        return $this->getCache()->set($cacheKey, $value, $ttl);
    }
protected function setToCache ( $ cacheKey , $ value , $ ttl = null ) { // Seralize as JSON to ensure array etc can be stored $ value = Convert :: raw2json ( $ value ) ; return $ this -> getCache ( ) -> set ( $ cacheKey , $ value , $ ttl ) ; }
Given a value, set it to the cache with the given key after serializing the value as JSON

@param string $cacheKey
@param mixed $value
@param int $ttl
@return bool
@throws \Psr\SimpleCache\InvalidArgumentException
Given a value set it to the cache with the given key after serializing the value as JSON