django-cachebot
django-cachebot copied to clipboard
adding a model instance via django admin doesn't invalidate cache
Hey there, first off I just wanna say thanks for working on this. Everything seemed fine until I noticed one of my models "Category" wasn't getting updated when I was calling Category.objects.cache().all(). The model is set properly i.e. "objects = CacheBotManager()". Whenever I add a new category in the admin panel, I think the cache isn't getting invalidated. Both on my site and shell when Category.objects().all() is being called, the result set is missing the newly added categories. Category.objects.all() includes the correct categories as expected. Is cachebot supposed to invalidate result sets from queries such as Category.objects.all() whenever a new category is added, or is it mainly for invalidating cached model instances and not queries? I'm sorry if my wording is incorrect/confusing and thanks for your help.
Does this only happen when you add a category from the admin panel? If you add a category from the shell does the query get invalidated?
Sorry, I haven't used it in a while and it's not setup on my app so I'm not sure. But I think in both cases, the query didn't get invalidated.
On Mon, Jul 18, 2011 at 3:01 PM, dziegler < [email protected]>wrote:
Does this only happen when you add a category from the admin panel? If you add a category from the shell does the query get invalidated?
Reply to this email directly or view it on GitHub: https://github.com/dziegler/django-cachebot/issues/3#issuecomment-1601413
~Ben Lee