private function generateCacheId()
    {
        $routingInfos = $this->getRouter()->getRoutingInformation();

        $aCacheId = array(
            ezpRestPrefixFilterInterface::getApiProviderName(),
            ezpRestPrefixFilterInterface::getApiVersion(),
            $routingInfos->controllerClass,
            $routingInfos->action
        );
        // Add internal variables, caught in the URL. See ezpRestHttpRequestParser::fillVariables()
        // Also add content variables
        foreach ( $this->request->contentVariables + $this->request->variables as $name => $val )
        {
            $aCacheId[] = $name . '=' . ( is_array( $val ) ? implode( ',', $val ) : $val );
        }

        return md5( implode( '-', $aCacheId ) );
    }