src/cm/client.py
changeset 605 830993bdf983
parent 504 b2e0186daa5b
--- a/src/cm/client.py	Mon Mar 10 17:01:09 2014 +0100
+++ b/src/cm/client.py	Tue Mar 11 11:05:25 2014 +0100
@@ -24,6 +24,7 @@
 import re
 import time
 import operator
+from django.core.cache import cache
 
 
 selection_place_error_msg = _(u'A selection is required. Select in the text the part your comment applies to.')
@@ -166,6 +167,7 @@
         comment.delete()
         ret['msg'] = _(u'comment removed')
         register_activity(request, "comment_removed", text=text, comment=comment)
+        cache.clear()
     except ObjectDoesNotExist: 
         pass
     return ret ;
@@ -288,6 +290,7 @@
         if AUTO_CONTRIB_REGISTER:
             Notification.objects.set_notification(text=text, type='own', active=True, email_or_user=user or email)            
         register_activity(request, "comment_created", text, comment)
+        cache.clear()
     return ret
 
 #we need to call comments_thread from here this function will be very expensive