如何设置缓存 key 而且不冲突。
class Region extends Model
{
use ModelTree;
protected $table = 'region';
public $timestamps = false;
public static function provinces()
{
return Cache::remember(__METHOD__, config('cache.long'), function () {
return (new static())->where('pid', 0)->where('type', 0)->get()->toArray();
});
}
}