From 11eed225b799c14519ee46305be11566dbbb22b8 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sun, 28 Sep 2008 14:18:12 -0400 Subject: blow the cached streams for tags on a new notice darcs-hash:20080928181812-5ed1f-708380f239b17b2a53b7279aa4a55af11156a5e8.gz --- classes/Notice.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'classes/Notice.php') diff --git a/classes/Notice.php b/classes/Notice.php index e72892966..3402e2b30 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -140,6 +140,22 @@ class Notice extends Memcached_DataObject $this->blowNoticeCache(); $this->blowRepliesCache(); $this->blowPublicCache(); + $this->blowTagCache(); + } + + function blowTagCache() { + $cache = common_memcache(); + if ($cache) { + $tag = new Notice_tag(); + $tag->notice_id = $this->id; + if ($tag->find()) { + while ($tag->fetch()) { + $tag->blowCache(); + } + } + $tag->free(); + unset($tag); + } } function blowSubsCache() { -- cgit v1.2.3-54-g00ecf