我的模型 Redis 和标签缓存有问题我收到错误错误:在 null 上调用成员函数 get()
$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);