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

Don't try to undo cache method monkey patching #1770

Merged
merged 1 commit into from
May 9, 2023

Commits on May 8, 2023

  1. Don't try to undo cache method monkey patching

    Trying to undo the monkey patch of cache methods in the
    CachePanel.disable_instrumentation() method is fragile in the presence
    of other code which may also monkey patch the same methods (such as
    Sentry's Django integration), and there are theoretically situations
    where it is actually impossible to do correctly.  Thus once a cache has
    been monkey-patched, leave it that way, and instead rely on checking in
    the patched methods to see if recording needs to happen.  This is done
    via a _djdt_panel attribute which is set to the current panel in the
    enable_instrumentation() method and then set to None in the
    disable_instrumentation() method.
    living180 committed May 8, 2023
    Configuration menu
    Copy the full SHA
    18fd55d View commit details
    Browse the repository at this point in the history