fix(cache purge): ensure cache URL path ends with a trailing slash#14
fix(cache purge): ensure cache URL path ends with a trailing slash#14alaminfirdows merged 2 commits intoflywp:developfrom
Conversation
WalkthroughThe Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
includes/Fastcgi_Cache.php(1 hunks)
🧰 Additional context used
🪛 GitHub Check: Run PHPCS inspection
includes/Fastcgi_Cache.php
[failure] 125-125:
No space before closing parenthesis is prohibited
[failure] 125-125:
Expected 1 spaces before closing parenthesis; 0 found
[failure] 125-125:
Expected 1 spaces after opening parenthesis; 0 found
[failure] 125-125:
No space after opening parenthesis is prohibited
[failure] 123-123:
Whitespace found at end of line
🪛 GitHub Actions: Inspections
includes/Fastcgi_Cache.php
[warning] 1-1: This comment is 58% valid code; is this commented out code?
[warning] 1-1: This comment is 58% valid code; is this commented out code?
[error] 1-1: Whitespace found at end of line
🔇 Additional comments (1)
includes/Fastcgi_Cache.php (1)
124-127: LGTM! Cache key normalization logic is correct.The logic properly ensures URL paths end with trailing slashes, which will fix cache inconsistencies where URLs with and without trailing slashes generated different cache keys. The implementation correctly handles edge cases including empty paths.
🧰 Tools
🪛 GitHub Check: Run PHPCS inspection
[failure] 125-125:
No space before closing parenthesis is prohibited
[failure] 125-125:
Expected 1 spaces before closing parenthesis; 0 found
[failure] 125-125:
Expected 1 spaces after opening parenthesis; 0 found
[failure] 125-125:
No space after opening parenthesis is prohibited
Fixes https://github.com/flywp/flywp-app/issues/1031
Summary by CodeRabbit