-
Notifications
You must be signed in to change notification settings - Fork 17
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
Use updated_user_meta
Instead of update_user_metadata
#623
Comments
@kristineds Would you like to take a shot at outlining this one all by yourself? I'm curious to see if you can search through the pro codebase and find our existing hook attached to |
@jaswsinc I've searched through the codebase and found these. Next Actions |
@kristineds Very close. We should use add_action('updated_user_meta', array($this, 'autoClearUserCacheFA2'), 10, 2); Taking this a step further, we should also attach to a different handler. The current handler is designed to work as a filter (i.e., Why? Notice this line in the WP core where the
So what we need is this: add_action('updated_user_meta', array($this, 'autoClearUserCacheA2'), 10, 2); and then we need to create the |
↑ I updated the above to improve clarity. |
@jaswsinc @raamdev Like this? Next Actions
|
@kristineds Yes, that looks correct, except Could you go ahead and submit a PR for this? 😄 |
@kristineds Really nice work on this. Fantastic! Just that minor tweak Raam mentioned and that should do it. |
@jaswsinc @raamdev Submitting PR for this: wpsharks/comet-cache-pro#195 Note: Is there a way I could edit that previous commit message title? I got it mixed up. . |
@kristineds writes...
|
Next Pro Release Changelog:
|
ZenCache Pro v151220 has been released and includes changes worked on as part of this GitHub Issue. See the release announcement for further details. This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one (#623). |
Reference: https://websharks.zencache.com/agent/tickets/9475
User experienced problems with logged-in user caching. The user did some troubleshooting and found that
autoClearUserCacheFA2
is called on every page load when a User is logged in. Then narrowed it down that the filterupdate_user_metadata
inPlugin.php
is what is triggeringautoClearUserCacheFA2
on every page load. So the user checked into the usermeta table in MySQL and verifited that it is NOT getting updated or changed on every page load.User looked into the update_metadata(…) source and the filter
update_user_metadata
is called regardless if the database is hit or not. User then changed the filter in thePlugin.php
fromupdate_user_metadata
toupdate_user_meta
and the cache is still cleared on every page load for the logged in user. User then changed the filter inPlugin.php
fromupdate_user_meta
toupdated_user_meta
and everything works perfectly. The cache for the logged in user is Not cleared on every page load and it is fast.If there is no specific reason we used
update_user_meta
instead ofupdated_user_meta
in ZenCache we should consider changing our code.The text was updated successfully, but these errors were encountered: