[5.7] Fix cache repository (#26495)
[5.7] Fix cache repository (#26495)

* Fix a bug with PHP 7.2.12

PHP 7.2.12 broke the way Carbon's diffInSeconds method works. Using diffInRealSeconds instead fixes the problem.

See https://github.com/briannesbitt/Carbon/issues/1503

* Clean up diff check in cache repository

We can pass the duration here directly.

Signed-off-by: Dries Vints <9818b0f8e34f57ac0059d0bc440479771e319166@gmail.com>

halaei/framework,hafezdivandari/framework,stevebauman/framework,vlakoff/framework,tjbp/framework,leo108/laravel_framework,srmkliveforks/framework,cybercog/framework,arturock/framework,mul14/laravel-framework,notebowl/laravel-framework,JosephSilber/framework,samlev/framework,barryvdh/framework,tomschlick/framework,tomschlick/framework,cviebrock/framework,jerguslejko/framework,crynobone/framework,arturock/framework,JamesForks/framework,rodrigopedra/framework,cybercog/framework,rodrigopedra/framework,srmkliveforks/framework,vlakoff/framework,leo108/laravel_framework,bytestream/framework,mul14/laravel-framework,gms8994/framework,tomschlick/framework,barryvdh/framework,rodrigopedra/framework,bytestream/framework,crynobone/framework,stidges/framework,dwightwatson/framework,jerguslejko/framework,srmkliveforks/framework,jerguslejko/framework,gms8994/framework,lucasmichot/framework,halaei/framework,jerguslejko/framework,halaei/framework,rodrigopedra/framework,driesvints/framework,vlakoff/framework,stidges/framework,JosephSilber/framework,cviebrock/framework,arturock/framework,lucasmichot/framework,ChristopheB/framework,morrislaptop/framework,dwightwatson/framework,ChristopheB/framework,mul14/laravel-framework,morrislaptop/framework,stevebauman/framework,ChristopheB/framework,cviebrock/framework,gms8994/framework,JamesForks/framework,stidges/framework,barryvdh/framework,cybercog/framework,cviebrock/framework,laravel/framework,samlev/framework,laravel/framework,gms8994/framework,tjbp/framework,notebowl/laravel-framework,barryvdh/framework,tjbp/framework,stidges/framework,hafezdivandari/framework,srmkliveforks/framework,mul14/laravel-framework,driesvints/framework