Fix Redis expiry (#616)#695
Closed
AnTheMaker wants to merge 1 commit intosimplepie:masterfrom
AnTheMaker:patch-1
Closed
Fix Redis expiry (#616)#695AnTheMaker wants to merge 1 commit intosimplepie:masterfrom AnTheMaker:patch-1
AnTheMaker wants to merge 1 commit intosimplepie:masterfrom
AnTheMaker:patch-1
Conversation
Member
|
Hi @AnTheMaker you're right that those url parameters are being ignored, but passing |
Contributor
|
Hey @AnTheMaker Since SimplePie 1.8.0 the @mblaney I think, this PR can be closed. |
Author
|
Alright, thanks a lot for the info @Art4! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This should fix a bug in the Redis cache-handler which caused the
timoutandprefixparamters to be ignored. Because of that you couldn't set a custom prefix for the Redis keys and all Redis data was stored indefinitely, without an expiry/timeout (Issue #616).The correct way to use the Redis cache-handler (according to the code comments and documentation) is the following:
redis://localhost:6379/?timeout=3600&prefix=sp_Until now however, the
timoutandprefixparamters were ignored. The Parameters already got parsed, so I just added two IFs to check if they are set and use them (or fall back to the defaults which were already there in the code if they aren't set).If there are any questions, please let me know!
I hope this gets merged (or fixed differently) as I'd love to use the Redis cache-handler instead of the flat-file cache but I can't use it because of the missing expiry functionality (at least until now)!