1

モックアップ Redis とタグ キャッシュに問題があります エラーが発生します Error: Call to a member function get() on null

$cache = Cache::shouldReceive('store->redis')->shouldReceive('tags')
                ->once()->with('tripUpdate')
                ->shouldReceive('get')
                ->once()->with('trip_update_' . 1)
                ->andReturn(json_encode([]));

このコードのモックアップを試してみたい:

       $tag = Cache::store("redis")->tags("tripUpdate");
       $tripUpdateCache = $tag->get('trip_update_' . $tripId);

4

0 に答える 0