Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel cache remember

 public function index() {
        $minutes = 1440; # 1 day
        $posts = Cache::remember('posts', $minutes, function () {
            return Post::get();
        });
        return $posts;
    }
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #laravel #cache #remember
ADD COMMENT
Topic
Name
1+8 =