|
@@ -11,11 +11,9 @@
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
-$this->get('/', function (Illuminate\Contracts\Cache\Factory $cache) {
|
|
|
- /** @var \Illuminate\Contracts\Cache\Store $store */
|
|
|
- $store = $cache->store();
|
|
|
- $cid = 'some cid';
|
|
|
- $store->put($cid, 'value', 10);
|
|
|
- $v = $store->get($cid);
|
|
|
- return $v;
|
|
|
+$this->get('/tasks', function () {
|
|
|
+ return Cache::remember('all-tasks', 1, function () {
|
|
|
+ $tasks = \App\Task::all();
|
|
|
+ return $tasks;
|
|
|
+ });
|
|
|
});
|