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

cleanup transients in option THEATER_TRANSIENTS_OPTION #333

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zupdo
Copy link

@zupdo zupdo commented Mar 20, 2024

Fix to: remove nonexisting transients from transient list (option THEATER_TRANSIENTS_OPTION).

Steps to reproduce:

  • open Kalendar, some Productions and/or Events in Frontend
  • check existing transients
    • wp option get theater_transient_keys
    • wp transient get 'one from list above'
  • wait more than 10 minutes
  • open wp-admin, open some production
  • check transients again (see above)
    • current result: transients exist in option theater_transient_keys, transients are empty
    • expected: option theater_transient_keys should be empty

For long running sites this leads to a huge amount of entries in option theater_transient_keys.
Each of them is reset again and again on many actions in wp-admin.
This leads to really slow backend pages.

About the change:
wordpress delete_transient() returns false if transient does not exist (anymore).
This is not an error condition. So removing the transient key from theater_transient_keys should always happen.

even if the transient itself does not exist anymore
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.

1 participant