protected function getOptions(ServiceLocatorInterface $services, $key)
    {
        $appConfig = $services->get('config');
        $options = array_key_exists($key, $appConfig) ? $appConfig[$key] : array();
        if (array_key_exists('cache', $options) 
                && is_string($options['cache']) 
                && $services->has($options['cache'])) {
            $options['cache'] = $services->get($options['cache']);
        }
        return $options;
    }