Skip to content

[5.6] Fix: If the expiration is null, set it permanently when increments in file cache driver - #24228

Merged
taylorotwell merged 1 commit into
laravel:5.6from
eddiclin:5.6
May 16, 2018
Merged

[5.6] Fix: If the expiration is null, set it permanently when increments in file cache driver#24228
taylorotwell merged 1 commit into
laravel:5.6from
eddiclin:5.6

Conversation

@eddiclin

Copy link
Copy Markdown
Contributor

I meet a bug when using increment of file cache driver.

Reproduce

Use file cache driver, config it in the .env

CACHE_DRIVER=file
Cache::increment('key');    // return 1
Cache::increment('key');    // ERROR: return 1

Fix

If the expiration is null, set it permanently when increments.

After fix:

Cache::increment('key');    // return 1
Cache::increment('key');    // return 2

@eddiclin eddiclin changed the title If the expiration is null, set it permanently when increments in file cache driver [5.6] Fix: If the expiration is null, set it permanently when increments in file cache driver May 16, 2018
@taylorotwell
taylorotwell merged commit 0b83cc1 into laravel:5.6 May 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants