Skip to content

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

@greg606

Description

@greg606

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions