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

Tables defined in CACHALOT_UNCACHABLE_APPS are still being cached #220

Open
hendrikschneider opened this issue Oct 3, 2022 · 0 comments

Comments

@hendrikschneider
Copy link

hendrikschneider commented Oct 3, 2022

Question

I have a structure like this:

App: AppA
class ModelA(models.Model):
   some fields ....

App: AppB
class ModelB(models.Model):
   linked_field = models.Foreignkey(ModelA, ...)

My settings are:

CACHALOT_UNCACHABLE_APPS = INSTALLED_APPS

CACHALOT_ONLY_CACHABLE_APPS = [
    "AppA"
]

Why are my setting likes this?
I've noticed that some tables are being cached of apps that were not defined to be cached. That's why I am exluding all
and whitelist them later on. When I only defined CACHALOT_ONLY_CACHABLE_APPS without setting CACHALOT_UNCACHABLE_APPS even more apps were cached even though they should't be (e.g celery beats table)

When using my application, I've noticed in the debug toolbar that also the tables of AppB are being cached even though they should not. I am also not access ModelB.

Is this behaviour as expected?

What have you tried so far?

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

No branches or pull requests

1 participant