-
Notifications
You must be signed in to change notification settings - Fork 150
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
Allow wildcards in CACHALOT_UNCACHABLE_TABLES #186
Comments
Thanks for the suggestion @iacobfred ! I like the alternative better as that makes sure we keep performance on par. I believe I can get all models associated with an app on initial Django setup and add that to My initial analysis of the original suggestionMy only concern would be performance / implementation of this wildcard. I've identified the most prominent areas in which it's used: django-cachalot/cachalot/utils.py Lines 158 to 177 in 1569ff7
We use sets a lot, and a wildcard would add a severe amount of Python rather than the C impl and when you think about ORMs (and from internals, these methods are called a lot), this adds a huge overhead. |
@iacobfred please let me know if #187 fixes this! |
@Andrew-Chen-Wang, yes it does! Thanks! |
I'm still going to see if I can implement this in the quest to deploy Django with partitioned tables... ref #153 (btw I won't comment on here anymore to not annoy with notifications, but leaving it open for reference later on). |
Description
It would be nice to be able to use wildcards (
*
) in theCACHALOT_UNCACHABLE_TABLES
setting; e.g.,Rationale
In the case that all models in a particular app must be excluded from Cachalot, this is very convenient.
Alternatives?
//: # Add another setting like
CACHALOT_UNCACHABLE_APPS
The text was updated successfully, but these errors were encountered: