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

Support for cache invalidation on bulk_update() method #472

Open
ashwani99 opened this issue Jan 21, 2024 · 3 comments
Open

Support for cache invalidation on bulk_update() method #472

ashwani99 opened this issue Jan 21, 2024 · 3 comments

Comments

@ashwani99
Copy link

ashwani99 commented Jan 21, 2024

Currently, support for bulk_create() is present but not bulk_update(). Any thoughts on adding this?

Some inspiration can be taken from #136

@Suor
Copy link
Owner

Suor commented Jan 23, 2024

.bulk_create() is already invalidated, you can look at the code in here. Unlike .bulk_update() it already had all changed objects with all their fields, do it doesn't require extra database queries to invalidate.

@Suor Suor closed this as completed Jan 23, 2024
@pg1671
Copy link

pg1671 commented Jul 7, 2024

Hi @Suor .. not sure why this was closed? It doesn't indicate the problem was resolved.

I have started to use bulk_update and realised the updates were not invalidated in the cache leading to strange behaviour in the application.

Is it best not to use bulk_update when using django-cacheops?

@Suor
Copy link
Owner

Suor commented Jul 7, 2024

Not sure why I closed this. There might be no efficient way to handle this though, requires some investigation.

@Suor Suor reopened this Jul 7, 2024
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

3 participants