Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Redis options not set - default to expire 0 #616

Closed
greg606 opened this issue Jul 17, 2019 · 4 comments · Fixed by #752
Closed

[BUG] Redis options not set - default to expire 0 #616

greg606 opened this issue Jul 17, 2019 · 4 comments · Fixed by #752
Labels

Comments

@greg606
Copy link

greg606 commented Jul 17, 2019

Description

When using Redis Cache there is no way to set redis cache expiry.
Url params are not taken into account

Steps to Reproduce

Steps to reproduce the behavior:

$remoteFeed = new SimplePie();
$remoteFeed->set_cache_location('redis://localhost:6379/?timeout=3600&prefix=sp_&dbIndex=0');
$remoteFeed->set_cache_duration(3601);
$remoteFeed->set_feed_url('any url');
$remoteFeed->init();

Expected Behavior

TTL of redis key not -1

Actual Behavior

TTL of redis key is -1

Possible Solutions

public function __construct($location, $name, $options = null) {

is always null
also constructor has wrong phpdoc

Environment

dev-master
php-redis on linux mint, php 7.3

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.94. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@issue-label-bot issue-label-bot bot added the bug label Jul 17, 2019
@skyzyx skyzyx removed their assignment Sep 3, 2019
@AnTheMaker
Copy link

This still isn't fixed yet, is it? I'm running into the same bug...

This was referenced Aug 23, 2021
@AnTheMaker
Copy link

AnTheMaker commented Aug 23, 2021

Made a PR to fix this bug, hope it gets merged!

@Art4
Copy link
Contributor

Art4 commented Oct 30, 2022

With SimplePie 1.8.0 it will be possible to set Redis as a PSR-16 cache implementation and modify there the cache expiry.

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

Successfully merging a pull request may close this issue.

4 participants