I use the file as cache driver and I want to cache the response from HTTP Client, but when I first time call a function everything works but when I call the function a second time to get data from cache I get this error
fseek(): Argument #1 ($stream) must be of type resource, int given
There is code I use for caching
public function manufacturers(){
return Cache::remember('manufacturers', 10, function () {
return Http::withoutVerifying()->post(config('api.systems').'Manufacturers/filter', [
'showAll' => true
]);
});
}
I tried other cache drivers and it works okay, I tried also to cache some other data instead of HTTP Client response and it also works fine.