Object cache Redis causing reset password link invalid

#1
Hi,

I'm using DigitalOcean's 1-click WordPress OLS droplet.

When a new user registers, he needs to reset his password, and the link to reset his password is sent by email. The problem is this link is always invalid when tried to open. I noticed that if I wait exactly 6 minutes from the time of registration, then the link will work! So I checked my LScache settings, and noticed Redis default object lifetime is 360 seconds (6 minutes). So to confirm this theory, I tried to register again as new user, and then directly after registration, I do "Purge All - Object Cache" from LScache menu, and I tried to open the reset password link, and it works.

So then my question is, is there a way maybe to exclude certain URL/cookie from being cached by Redis? Because from my search, I don't see any clues saying this is possible. FYI I've excluded the URLs for reset password on LScache settings, but it's still not working, I assume LScache is not the same as object cache?

Or maybe there's a way to "manually" purge object cache whenever a new user registers?

If possible, I'd like to keep using object cache. I've used Redis since my previous stacks, and it's been working good. But if you think Redis won't make much of a difference with LScache combined, I'd like to hear your thoughts on that.

Thanks in advance.
 

Cold-Egg

Administrator
#2
Hi,

Just tried but I can not reproduce it on my test server. Will it makes any difference if you set both Persistent Connection and Store Transients to Off?
 
#3
Hi @Cold-Egg ,

Thanks for the reply, sorry forgot to mention, I use this plugin:

https://github.com/theme-my-login/theme-my-login/releases/tag/v6.4.16

Not sure if this is the cause you can't reproduce the issue on your server.

I've tried your suggestions, disabling "Persistent Connection" and "Store Transients", sadly both were unsuccessful. But I've found a solution for this, by including "userlogins" in the "Do Not Cache Groups" in the Object Cache settings.

To be honest, I've thought about this solution for a while, but was still looking if there's a list of object cache/Redis groups and what each group consists of, but I can't seem to find one. That's why I was postponing on testing this solution as I'm a bit doubtful on what this will do.

Anyway, thanks again for the help.

Side note:

Before this, I've also tried the "Purge All Hooks" settings, and tried to put hooks like "user_register", "after_password_reset", etc. but they're not working.
 

lsqtwrk

Administrator
#4
Hi,

Frankly I am also looking for this

but was still looking if there's a list of object cache/Redis groups and what each group consists of, but I can't seem to find one.
but unsuccessful , couldn't find anything regard on this :(

Best regards,
 
Top