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

prevent unnecessary cache clearing #224

Merged
merged 16 commits into from
Mar 29, 2024
Merged

Conversation

timse201
Copy link
Contributor

@timse201 timse201 commented Apr 15, 2021

  • flush cache when comment is in database and not before

  • flush when comment is or was approved

  • move comment hooks to comment 'flush hooks'

  • rename functions for better code comprehension

  • removes user_register and edit_user_profile_update from flush total cache

  • because of edit_comment $data we need wp 4.6 or greater

#223

Copy link
Contributor

@stklcode stklcode left a comment

Choose a reason for hiding this comment

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

Thanks for your work.

The changes in general are well suited for point release like 2.4, however they do introduce some breaking changes and I'm not sure whether we should raise the major version for this, if there is an viable way to add the new behavior non-breaking.

inc/class-cachify.php Outdated Show resolved Hide resolved
inc/class-cachify.php Outdated Show resolved Hide resolved
inc/class-cachify.php Show resolved Hide resolved
inc/class-cachify.php Outdated Show resolved Hide resolved
@krafit krafit self-requested a review December 23, 2021 11:16
inc/class-cachify.php Outdated Show resolved Hide resolved
inc/class-cachify.php Show resolved Hide resolved
@stklcode stklcode linked an issue Dec 29, 2021 that may be closed by this pull request
@stklcode stklcode removed a link to an issue Dec 29, 2021
Comment on lines 1111 to 1254
'user_register' => 10,
'edit_user_profile_update' => 10,
Copy link
Member

Choose a reason for hiding this comment

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

I would not remove those, like @stklcode wrote in #223 (comment), user info can be displayed in many places.

Copy link
Contributor

Choose a reason for hiding this comment

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

Re-added "edit_user_profile_update" for now in decdd88

We can discuss about refining this in future changes.

@stklcode
Copy link
Contributor

because of edit_comment $data we need wp 4.6 or greater

We require 4.7 since #268, so that's no longer an issue here.

@stklcode stklcode linked an issue Nov 20, 2022 that may be closed by this pull request
Copy link
Contributor

@stklcode stklcode left a comment

Choose a reason for hiding this comment

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

Should be OK now.

A second opinion would not hurt here though.

@pluginkollektiv pluginkollektiv deleted a comment from sonarcloud bot Oct 31, 2023
Copy link

sonarcloud bot commented Mar 29, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
2.9% Duplication on New Code

See analysis details on SonarCloud

@pluginkollektiv pluginkollektiv deleted a comment from sonarcloud bot Mar 29, 2024
@stklcode stklcode merged commit ee5dafa into pluginkollektiv:develop Mar 29, 2024
8 checks passed
@stklcode stklcode added this to the 2.4.0 milestone Mar 29, 2024
@timse201 timse201 deleted the patch-4 branch March 29, 2024 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flush cache overwork
4 participants