Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

Cache not work when data fetch using curl? #130

Open
Xinecraft opened this issue Jan 26, 2023 · 0 comments
Open

Cache not work when data fetch using curl? #130

Xinecraft opened this issue Jan 26, 2023 · 0 comments

Comments

@Xinecraft
Copy link

Hi,
If I fetch data from a URL using Request::get() and then pass it to the cache, caching won't work in that case? It's not working for me.

Eg:

$img = Image::cache(function ($image) use ($param) {
                $url = "https://someurl.com/$param";
                $data = Http::get($url)->body();
                return $image->make($data);
}, 60, true); 

I am using this way because passing directly the URL to $image->make(URL) slow down the request by a lot in php-fpm idk why.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant