private function randomizeExpirationTime(CacheItemInterface $item)
    {
        // Get expires time (if previously set by headers forwarding)
        $expiresAtTimestamp = $item->getExpiresAt() ? $item->getExpiresAt()->getTimestamp() : null;

        // Generate expires time from creation date and default interval
        $expiresAtTimestamp = $expiresAtTimestamp ?: ($item->getCreatedAt()->getTimestamp() + $this->cacheExpiresIn);

        // Slightly random offset
        $offset = log10(mt_rand(10, 1000)) * mt_rand(-2, 2);
        $item->setExpiresAt((new DateTime())->setTimestamp($expiresAtTimestamp + $offset));
    }