maxAgeToExpire example

            'keys' => $elements['#cache']['keys'],
            // The union of the current element's and stored cache contexts.             'contexts' => $redirect_cacheability_updated->getCacheContexts(),
            // The union of the current element's and stored cache tags.             'tags' => $redirect_cacheability_updated->getCacheTags(),
            // The union of the current element's and stored cache max-ages.             'max-age' => $redirect_cacheability_updated->getCacheMaxAge(),
            // The same cache bin as the one for the actual render cache items.             'bin' => $bin,
          ],
        ];
        $cache->set($pre_bubbling_cid$redirect_data$this->maxAgeToExpire($redirect_cacheability_updated->getCacheMaxAge()), Cache::mergeTags($redirect_data['#cache']['tags']['rendered']));
      }

      // Current cache contexts incomplete: this request only uses a subset of       // the cache contexts stored in the redirecting cache item. Vary by these       // additional (conditional) cache contexts as well, otherwise the       // redirecting cache item would be pointing to a cache item that can never       // exist.       if (array_diff($redirect_cacheability_updated->getCacheContexts()$data['#cache']['contexts'])) {
        // Recalculate the cache ID.         $recalculated_cid_pseudo_element = [
          '#cache' => [
            
Home | Imprint | This part of the site doesn't use cookies.