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

[CMSP-624] Check for and recommend Object Cache Pro #147

Merged
merged 8 commits into from
Aug 23, 2023

Conversation

rachelwhitton
Copy link
Member

Check for and recommend Object Cache Pro

@rachelwhitton rachelwhitton requested review from a team as code owners August 23, 2023 15:10
Copy link

@rwagner00 rwagner00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Co-authored-by: Chris Reynolds <chris@jazzsequence.com>
Copy link
Contributor

@jazzsequence jazzsequence left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the first if got swallowed in applying the changes, so there's just a } else { which will be a syntax error and break the command.

The Behat tests should be updated as well so they are passing before we merge this. Let us know if you need us to dig into those.

Copy link
Contributor

@jazzsequence jazzsequence left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple more tweaks to the logic.

  1. Check if WP_REDIS_OBJECT_CACHE is defined. This tells us if WP Redis is installed. If it is, give them a message that says "Hey, you should use OCP instead." Otherwise...
  2. Check if WP_REDIS_CONFIG is defined. In this case we are checking to see if it doesn't exist, because we want to tell them to install it if they don't have it. If it's already defined...
  3. Return success, OCP is found.

I wasn't able to do it in my snippet without breaking things, but with the new elseif it should probably be on the same line as the closing } from the previous if.

php/pantheon/checks/objectcache.php Outdated Show resolved Hide resolved
php/pantheon/checks/objectcache.php Outdated Show resolved Hide resolved
php/pantheon/checks/objectcache.php Outdated Show resolved Hide resolved
@jazzsequence jazzsequence changed the title Check for and recommend Object Cache Pro [CMSP-624] Check for and recommend Object Cache Pro Aug 23, 2023
@jazzsequence jazzsequence merged commit a3ddc54 into pantheon-systems:main Aug 23, 2023
1 check passed
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

Successfully merging this pull request may close these issues.

3 participants