From 9e32c2e9606079e72c58075d9167634dcfc65a01 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 17 Nov 2002 06:42:52 +0000 Subject: Patch based on work of Kjartan: - Changed cache API. - Fixed caching bug in comment.module. Odd this hasn't been reported yet. - Fixed caching bug in forum.module. - Fixed caching bug in system.module. - Fixed caching bug in block.module. - Simplified caching support in forum.module thanks to improved cache API. --- modules/comment/comment.module | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'modules/comment/comment.module') diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 4c0dd1b64..8c1c7b57f 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -276,17 +276,11 @@ function comment_post($edit) { } /* - ** Clear the cache: + ** Clear the cache so an anonymous user can see his comment being + ** added. */ - cache_clear(); - - /* - ** TODO: we'd prefer to invalidate the page or pages with the newly - ** inserted comment. - ** - ** db_query("DELETE FROM cache WHERE cid LIKE '%s'", "%id=".$edit["nid"]."%"); - */ + cache_clear_all(); } } else { -- cgit v1.2.3