public function setCache($key, $value, $ttl = 0)
    {
        $cache_function = $this->set_cache_callback;

        return $cache_function($this->cache_type, array('key' => $key, 'value' => $value, 'ttl' => $ttl));
    }