Jul 7, 2016
0
Level 13
[Issue] Caching with array driver
Hey everybody,
I'm using the entrust package to handle roles and permissions. This package forced me to switch the cache driver to something else than file or database. In most threads I read about using array as cache driver.
When using this driver I'm not able to cache data anymore. Simple example in my routes.php:
Route::get('test', function() {
$data = Cache::remember('foo', 5, function() {
return 'bar';
});
return $data;
});
When I hit the route, change return 'bar'; to return 'foo'; "foo" gets returned. But imo "bar" should be stored in the cache for 5 minutes instead. When changing the cache driver to file it works like expected. Do you have any idea what causes the issue here?
Thanks a lot.
Please or to participate in this conversation.