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

Cache not work when data fetch using curl? #130

@Xinecraft

Description

@Xinecraft

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions