[pLog-svn] r2872 - plog/trunk/class/dao

oscar at devel.lifetype.net oscar at devel.lifetype.net
Sun Jan 29 22:03:25 GMT 2006


Author: oscar
Date: 2006-01-29 22:03:24 +0000 (Sun, 29 Jan 2006)
New Revision: 2872

Modified:
   plog/trunk/class/dao/articles.class.php
Log:
One of the caches wasn't being cleaned at all.

Modified: plog/trunk/class/dao/articles.class.php
===================================================================
--- plog/trunk/class/dao/articles.class.php	2006-01-29 19:46:43 UTC (rev 2871)
+++ plog/trunk/class/dao/articles.class.php	2006-01-29 22:03:24 UTC (rev 2872)
@@ -10,7 +10,6 @@
     define( "CACHE_ARTICLES",            "articles" );
     define( "CACHE_ARTICLES_BYNAME",     "articles_byname" );    
     define( "CACHE_ARTICLETEXT",         "article_text" );    
-    define( "CACHE_ARTICLES_BYBLOG",     "articles_byblog" );
     define( "CACHE_ARTICLESPERMONTH",    "articles_per_month" );
     
     /**
@@ -878,8 +877,6 @@
                                            'article_id',
                                            $article->getId() );
 
-			include_once( PLOG_CLASS_PATH."class/dao/recentarticles.class.php" );
-			RecentArticles::resetRecentArticlesCache( $article->getBlogId());
             $this->_cache->removeData( $article->getId(), CACHE_ARTICLETEXT );
 
 			return($this->Execute( $query ));
@@ -911,8 +908,12 @@
 			include_once( PLOG_CLASS_PATH."class/dao/recentarticles.class.php" );
 			RecentArticles::resetRecentArticlesCache( $article->getBlogId());			
             $this->_cache->removeData( $article->getBlogId(), CACHE_ARTICLESPERMONTH );
-            $this->_cache->removeData( $article->getId(), CACHE_ARTICLES );
-            $this->_cache->removeData( $article->getBlogId(), CACHE_ARTICLES_BYBLOG );
+			$this->_cache->removeData( $article->getId(), CACHE_ARTICLETEXT );
+            $this->_cache->setData( $article->getId(), CACHE_ARTICLES, $article );
+			$this->_cache->removeData( $article->getPostSlug(), CACHE_ARTICLES_BYNAME );
+			
+			include_once( PLOG_CLASS_PATH."class/dao/recentarticles.class.php" );
+			RecentArticles::resetRecentArticlesCache( $article->getBlogId());			
 
             return true;
         }



More information about the pLog-svn mailing list