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

Handle empty WP_CACHE_SALT parameter #16

Open
soulseekah opened this issue Feb 21, 2020 · 2 comments
Open

Handle empty WP_CACHE_SALT parameter #16

soulseekah opened this issue Feb 21, 2020 · 2 comments

Comments

@soulseekah
Copy link

soulseekah commented Feb 21, 2020

As per 7b85660 from #13 by @msigley we seem to prefix the keys with a single ":" if the WP_CACHE_SALT parameter is empty.

The proposal is to remove the prefix altogether then.

Is this okay? Is this not okay?
If we change it now do we break existing deployments? Probably not. They'll just expire. Any conflicts? Who knows?

@soulseekah
Copy link
Author

This is a great idea 853454c

define( 'WP_CACHE_KEY_SALT', ABSPATH ); by @kagg-design

I wouldn't think that ABSPATH would be a good key prefix in Redis, though.

Maybe hash it to something less obtuse?

Maybe we can always use ABSPATH in the prefix, outside of the WP_CACHE_KEY_SALT context?

Needs more thoughts.

@msigley
Copy link

msigley commented Feb 21, 2020

I hashed the abspath with crc32 in my implementation. Big key lengths are bad for redis performance.
Removing the : on empty cache salts allows the redisinsight memory profiler to function properly.

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

No branches or pull requests

2 participants