Background
Laravel Version 4.2 offers caching based at the QueryBuilder level using a call to the remember() method.
The documentation suggests, you can either use rememberForever() or remember($minutes)
When using remember(0) I would expect the resulting cache to expire immediately or be remembered for less than a minute.
Question
Why does the below query cache not expire straight away?
$model = Model::remember(0)->where('id', 789)->first();
I'm using the file driver.
The Laravel Docs state
$users = DB::table('users')->remember(10)->get();What the documentation fails to state is that if you are using a
filedriver and you pass0then you'll hit this line of code.Meaning you will get a file based cache with an expiration of Sat, 20 Nov 2286 17:46:39 +0000