public static function fetch(Cache $cache, $key, $callback, $args, $ttl = 300)
    {
        if (!(is_string($key))) {
            throw new \Exception('Cache key must be a string');
        }

        $item = $cache->get($key);
        if ($item === false) {
            $item = static::runCallback($callback, $args);

            if (isset($item)) {
                $cache->set($key, $item, $ttl);
            }
        }
        return $item;
    }