public function saveCallbackResult($result)
    {
        // get cache key
        $cacheKey = $this->getCacheKey();

        // cache the result
        try {
            $cache = $this->cache($this->requestBag->getApiConfig()->get('Cache'));

            return $cache->save($cacheKey, $result, $this->requestBag->getMethodData()['cache']['ttl']);
        } catch (\Exception $e) {
            throw new RestException('Unable to save the result into cache. ' . $e->getMessage());
        }
    }