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

Flush cache overwork #223

Closed
timse201 opened this issue Apr 15, 2021 · 1 comment · Fixed by #224
Closed

Flush cache overwork #223

timse201 opened this issue Apr 15, 2021 · 1 comment · Fixed by #224
Milestone

Comments

@timse201
Copy link
Contributor

timse201 commented Apr 15, 2021

Right now the entire cache is cleared when
user_register - don't know why
edit_user_profile_update - why should it clear all and not it's own profile page cache
delete_user - makes sense if there is a link to the profile

and add some third parties:
to clear entire cache:
autoptimize_action_cachepurged
when needed:
woocommerce_product_set_stock
woocommerce_variation_set_stock
woocommerce_product_set_stock_status
woocommerce_variation_set_stock_status

@stklcode
Copy link
Contributor

edit_user_profile_update - why should it clear all and not it's own profile page cache

User names are potentially displayed on very post, page or comment as author reference. Collecting all affected pages, including archives, summaries, widgets, etc. seems overdone.

@krafit krafit added this to the 2.4.0 milestone Dec 23, 2021
@stklcode stklcode linked a pull request Dec 29, 2021 that will close this issue
@stklcode stklcode removed a link to a pull request Dec 29, 2021
@stklcode stklcode linked a pull request Nov 20, 2022 that will close this issue
stklcode pushed a commit that referenced this issue Mar 29, 2024
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants