/**
  * Create a complete cache identifier for the given
  * request that conforms to cache identifier syntax
  *
  * @param RequestInterface $request
  * @return string
  */
 protected function createCacheIdentifier($request)
 {
     $cacheIdentifiersParts = [];
     do {
         $cacheIdentifiersParts[] = $request->getControllerPackageKey();
         $cacheIdentifiersParts[] = $request->getControllerSubpackageKey();
         $cacheIdentifiersParts[] = $request->getControllerName();
         $cacheIdentifiersParts[] = $request->getControllerActionName();
         $cacheIdentifiersParts[] = $request->getFormat();
         $request = $request->getParentRequest();
     } while ($request instanceof ActionRequest);
     return md5(implode('-', $cacheIdentifiersParts));
 }