? Pending

User tests: Successful: Unsuccessful:

avatar alikon
alikon
17 Aug 2022

Pull Request for Issue #38473 .

Summary of Changes

deal with INFinite ?
introduced by #37457

Testing Instructions

use redis Cache Handler

Actual result BEFORE applying this Pull Request

Redis::setex(): Argument #2 ($expire) must be of type int, float given

Expected result AFTER applying this Pull Request

works as before

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar alikon alikon - open - 17 Aug 2022
avatar alikon alikon - change - 17 Aug 2022
Status New Pending
avatar alikon alikon - change - 17 Aug 2022
The description was changed
avatar alikon alikon - edited - 17 Aug 2022
avatar joomla-cms-bot joomla-cms-bot - change - 17 Aug 2022
Category Libraries
avatar roland-d
roland-d - comment - 17 Aug 2022

@Stuartemk could you give this a test please and see if it resolves your issue?

avatar RodHub
RodHub - comment - 17 Aug 2022

@roland-d I had the same issue and it's solved with this fix.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38490.

avatar RodHub
RodHub - comment - 17 Aug 2022

I have tested this item successfully on f1a8fd2

Issue is gone after replacing RedisStorage.php with the fixed version.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38490.

avatar RodHub RodHub - test_item - 17 Aug 2022 - Tested successfully
avatar roland-d
roland-d - comment - 17 Aug 2022

@alikon How do I get the lifetime to be infinite?

avatar Fedik
Fedik - comment - 17 Aug 2022

@roland-d check linked PR
@alikon Probably we better change INF to a 1 year 31557600 (or a couple years):

// Media version cache never expire
$cache->setLifeTime(INF);

It will be more safe than hacking every potential issue with Cache drivers.

You will update or I do PR?
Set it to 10 years 315576000 ?

avatar alikon
alikon - comment - 17 Aug 2022

in redis term if something "never expire" the there is no need to setex() just store it set()

avatar Fedik
Fedik - comment - 17 Aug 2022

in redis term if something "never expire" the there is no need to setex() just store it set()

Yeah, but we also better cover our backs.
Because other drivers may have similar issue, they may expect integer for lifetime, while PHP INF is float.

avatar alikon alikon - change - 17 Aug 2022
Labels Added: ?
d5f116f 17 Aug 2022 avatar alikon cs
avatar alikon
alikon - comment - 17 Aug 2022

@Fedik changed INF to 315576000

avatar roland-d
roland-d - comment - 17 Aug 2022

@alikon the RedisStorageCache file should not show a change anymore and it looks like it has a tab/space too many. Could you check please?

abadf05 17 Aug 2022 avatar alikon cs
avatar Fedik
Fedik - comment - 17 Aug 2022

I have tested this item successfully on abadf05

Cannot do a real test, but on review looks good. Changing INF Float to Integer for a lifetime value


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38490.

avatar Fedik Fedik - test_item - 17 Aug 2022 - Tested successfully
avatar Fedik
Fedik - comment - 17 Aug 2022

@RodHub can you please do one more test? Thanks in advance

avatar fancyFranci
fancyFranci - comment - 18 Aug 2022

The code comment before the changed line does not fit any more. Could you please edit it and explain the 10 years in the comment? :)

avatar roland-d roland-d - change - 18 Aug 2022
Labels Added: Release Blocker
avatar roland-d
roland-d - comment - 18 Aug 2022

RTC

avatar roland-d roland-d - change - 18 Aug 2022
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-08-18 18:48:49
Closed_By roland-d
Labels Removed: Release Blocker
avatar roland-d roland-d - close - 18 Aug 2022
avatar roland-d roland-d - merge - 18 Aug 2022

Add a Comment

Login with GitHub to post a comment