Open vishen opened 10 years ago
I can confirm that this is a problem on latest stable Django (1.6.4). I deleted a comment via the admin, and the comment still displays in the admin listing, and in my article detail view in site's front-end. Commend was definitely deleted - clicking on it in the admin listing, to go to its admin detail page, results in 404.
Clearing all caches (i.e. restarting memcached) makes the deleted item disappear from admin / front-end. But that, of course, is not a solution.
Will look into this if I can, although might be a bit out of my depth debugging it in johnny-cache.
Also seeing this, exactly as @Jaza is describing it.
Would like to see this in. I cannot create a new item in the admin back-end at all when caching is enabled.
I know there is / was still a problem with django>=1.6 and the current atomic transactions django uses.
Django uses the
@transaction.atomic
around all of the admin views (https://github.com/django/django/blob/stable/1.6.x/django/contrib/admin/options.py#L1099). This causes a problem, because when johnny tries to invalidate a table, it checks if the current transaction is managed, and handles invalidation differently depending on if it is managed or not.I was having the problem where I would add something in the admin panel, and I wasn't seeing the new object in the change view.
Sorry if this is a little sparse, writing this quickly so I don't lose my train of thought.