Add a never cache decorator to the view that does the deleting (and perhaps
to the view that lists the items). Then you shouldn't have any problems and
you can still use the cache middleware.

See https://docs.djangoproject.com/en/1.6/topics/cache/

Regards,

Andréas

2014-12-19 5:07 GMT+01:00 T Kwn <tdk...@gmail.com>:
>
> I have a list view where I can add or delete objects. I found that if the
> cache middleware is included:
>
> 'django.middleware.cache.UpdateCacheMiddleware',
> 'django.middleware.cache.FetchFromCacheMiddleware'
>
> The page doesn't operate properly. Basically deleted objects don't always 
> disappear.
> Added objects didn't display etc. I verified objects are created or deleted 
> by viewing the db file.
>
> Finally I deleted the cache middelware and now the page operates properly.
>
> So when I finally go into production will I have a problem because there's no 
> caching? Or
> if I want to enable caching, how do I prevent this problem again? It appears 
> the cache
> middleware isn't operating properly but I can't see how it wouldn't have been 
> fixed by now...
>
> I'm running python 2.7 and django 1.6.2
>
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c356fe31-8c94-4744-8040-e66c5524ead4%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/c356fe31-8c94-4744-8040-e66c5524ead4%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALXYUbn8J1u7fEZBKw%3DoJQFUQZYjir7KQ79p53UqqvO-qadyiQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to