“Laravel Redis Cache” Kode Jawaban

Laravel Clear Cache

//Laravel 7 / 2021-01
php artisan cache:clear
php artisan route:clear
php artisan config:clear
php artisan optimize
Mère Thorrésa

Bersihkan cache Laravel

php artisan view:clear 
php artisan cache:clear
php artisan route:clear
php artisan config:clear
php artisan optimize
Wicked Wallaby

cache jelas di Laravel

php artisan cache:clear
php artisan view:clear
php artisan route:clear
php artisan clear-compiled
php artisan config:cache
Breakable Butterfly

Bersihkan cache Laravel

php artisan view:clear
php artisan config:clear
php artisan route:clear
php artisan cache:clear
php artisan clear-compiled
Modern Mouse

Laravel Cache Ingat

 public function index() {
        $minutes = 1440; # 1 day
        $posts = Cache::remember('posts', $minutes, function () {
            return Post::get();
        });
        return $posts;
    }
Abdullah Mohamed

Laravel Redis Cache

// i am using laravel versioin 8  so...... 
// use this in ur controller then
use Illuminate\Support\Facades\Cache;
// in function 
Cache::put('key', 'value', 1440);// 1 day
Cache::get('key');
Cache::has('key');
Cache::pull('key');
Cache::forget('key');// remove spacific
Cache::flush(); // remove  all
polyglot orca

Jawaban yang mirip dengan “Laravel Redis Cache”

Pertanyaan yang mirip dengan “Laravel Redis Cache”

Lebih banyak jawaban terkait untuk “Laravel Redis Cache” di PHP

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya