Skip to content

Can't cache for less than 1 minute anymore #2954

@m19

Description

@m19

I'm having a small issue since upgrading to 4.1.

This used to work:
Cache::put('something', 'a value', 0.25);
Now only this works:
Cache::put('something', 'a value', 1);

I also tried passing in a carbon object

Passing in this works:
$expiresAt = \Carbon\Carbon::now()->addMinutes(1);
Passing in this doesn't:
$expiresAt = \Carbon\Carbon::now()->addSeconds(10);

I'm calculating a price based on external api's from other websites and I want to cache this value for about 15 seconds. I thought putting this value in cache for that time would be the best option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions