diff --git a/src/Illuminate/Http/Middleware/Cache.php b/src/Illuminate/Http/Middleware/Cache.php deleted file mode 100644 index 2910cdca5bbd..000000000000 --- a/src/Illuminate/Http/Middleware/Cache.php +++ /dev/null @@ -1,47 +0,0 @@ -isMethodCacheable() || ! $response->getContent()) { - return $response; - } - - if (\is_string($options)) { - $parsedOptions = []; - foreach (explode(';', $options) as $opt) { - $data = explode('=', $opt, 2); - $parsedOptions[$data[0]] = $data[1] ?? true; - } - - $options = $parsedOptions; - } - - if (isset($options['etag']) && true === $options['etag']) { - $options['etag'] = md5($response->getContent()); - } - - $response->setCache($options); - $response->isNotModified($request); - - return $response; - } -} diff --git a/tests/Http/Middleware/CacheTest.php b/tests/Http/Middleware/CacheTest.php index 6d865e973bdc..3ee815c634cb 100644 --- a/tests/Http/Middleware/CacheTest.php +++ b/tests/Http/Middleware/CacheTest.php @@ -5,7 +5,7 @@ use Illuminate\Http\Request; use Illuminate\Http\Response; use PHPUnit\Framework\TestCase; -use Illuminate\Http\Middleware\Cache; +use Illuminate\Http\Middleware\SetCacheHeaders as Cache; class CacheTest extends TestCase {