[pLog-svn] r1951 - plog/branches/plog-1.0.1/class/action/admin

oscar at devel.plogworld.net oscar at devel.plogworld.net
Thu May 5 23:31:07 GMT 2005


Author: oscar
Date: 2005-05-05 23:31:06 +0000 (Thu, 05 May 2005)
New Revision: 1951

Modified:
   plog/branches/plog-1.0.1/class/action/admin/adminaddarticlecategoryaction.class.php
   plog/branches/plog-1.0.1/class/action/admin/adminaddlinkaction.class.php
   plog/branches/plog-1.0.1/class/action/admin/adminaddlinkcategoryaction.class.php
   plog/branches/plog-1.0.1/class/action/admin/adminaddresourceaction.class.php
   plog/branches/plog-1.0.1/class/action/admin/adminaddresourcealbumaction.class.php
   plog/branches/plog-1.0.1/class/action/admin/admindeletearticlecategoryaction.class.php
   plog/branches/plog-1.0.1/class/action/admin/admindeletegalleryitemsaction.class.php
   plog/branches/plog-1.0.1/class/action/admin/admindeletelinkaction.class.php
   plog/branches/plog-1.0.1/class/action/admin/admindeletelinkcategoryaction.class.php
   plog/branches/plog-1.0.1/class/action/admin/admindeletereferreraction.class.php
   plog/branches/plog-1.0.1/class/action/admin/admindeleteresourceaction.class.php
   plog/branches/plog-1.0.1/class/action/admin/admindeleteresourcealbumaction.class.php
   plog/branches/plog-1.0.1/class/action/admin/adminupdatelinkaction.class.php
   plog/branches/plog-1.0.1/class/action/admin/adminupdatelinkcategoryaction.class.php
   plog/branches/plog-1.0.1/class/action/admin/adminupdateresourceaction.class.php
   plog/branches/plog-1.0.1/class/action/admin/adminupdateresourcealbumaction.class.php
Log:
so far, whenever *any* data related to the plog changed, the blog and the summary cache were both cleared even if the data was not going to be shown in the summary anyway (such as resources, links, etc)

Now I've tried to reduce the number of times the summary cache is cleaned to only when a post is added/edited/removed, a comment or trackback is removed and if the blog settings are changed. Changes to links, link categories, albums or resources will not trigger a reset of the summary cache. 

Let me know if you can find any issue related to this...

Modified: plog/branches/plog-1.0.1/class/action/admin/adminaddarticlecategoryaction.class.php
===================================================================
--- plog/branches/plog-1.0.1/class/action/admin/adminaddarticlecategoryaction.class.php	2005-05-05 23:27:57 UTC (rev 1950)
+++ plog/branches/plog-1.0.1/class/action/admin/adminaddarticlecategoryaction.class.php	2005-05-05 23:31:06 UTC (rev 1951)
@@ -80,7 +80,7 @@
 				$this->notifyEvent( EVENT_POST_CATEGORY_ADD, Array( "category" => &$category ));
 				
 				// clear the cache if everything went fine
-				CacheControl::resetBlogCache( $this->_blogInfo->getId());														
+				CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );														
 				
 				$this->setCommonData();				
             }

Modified: plog/branches/plog-1.0.1/class/action/admin/adminaddlinkaction.class.php
===================================================================
--- plog/branches/plog-1.0.1/class/action/admin/adminaddlinkaction.class.php	2005-05-05 23:27:57 UTC (rev 1950)
+++ plog/branches/plog-1.0.1/class/action/admin/adminaddlinkaction.class.php	2005-05-05 23:31:06 UTC (rev 1951)
@@ -78,7 +78,7 @@
             $this->setCommonData();
 			
 			// clear the cache
-			CacheControl::resetBlogCache( $this->_blogInfo->getId());
+			CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
 
             // better to return true if everything fine
             return true;

Modified: plog/branches/plog-1.0.1/class/action/admin/adminaddlinkcategoryaction.class.php
===================================================================
--- plog/branches/plog-1.0.1/class/action/admin/adminaddlinkcategoryaction.class.php	2005-05-05 23:27:57 UTC (rev 1950)
+++ plog/branches/plog-1.0.1/class/action/admin/adminaddlinkcategoryaction.class.php	2005-05-05 23:31:06 UTC (rev 1951)
@@ -53,7 +53,7 @@
             }
 			else {
 				// clear the cache
-				CacheControl::resetBlogCache( $this->_blogInfo->getId());
+				CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
 				$this->_view->setSuccessMessage( $this->_locale->pr("link_category_added_ok", $mylinksCategory->getName()));	
 			}
 			

Modified: plog/branches/plog-1.0.1/class/action/admin/adminaddresourceaction.class.php
===================================================================
--- plog/branches/plog-1.0.1/class/action/admin/adminaddresourceaction.class.php	2005-05-05 23:27:57 UTC (rev 1950)
+++ plog/branches/plog-1.0.1/class/action/admin/adminaddresourceaction.class.php	2005-05-05 23:31:06 UTC (rev 1951)
@@ -100,7 +100,7 @@
 			
 			// clear the cache no matter what happened... we should only clear it if there was at least one
 			// file uploaded but this way is not that bad after all...
-			CacheControl::resetBlogCache( $this->_blogInfo->getId());
+			CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
 			
 			if( $successMessage != "" ) $this->_view->setSuccessMessage( $successMessage );
 			if( $errorMessage != "" ) $this->_view->setErrorMessage( $errorMessage );

Modified: plog/branches/plog-1.0.1/class/action/admin/adminaddresourcealbumaction.class.php
===================================================================
--- plog/branches/plog-1.0.1/class/action/admin/adminaddresourcealbumaction.class.php	2005-05-05 23:27:57 UTC (rev 1950)
+++ plog/branches/plog-1.0.1/class/action/admin/adminaddresourcealbumaction.class.php	2005-05-05 23:31:06 UTC (rev 1951)
@@ -65,7 +65,7 @@
                 $this->_view->setSuccessMessage( $this->_locale->pr( "album_added_ok", $album->getName()));
 				$this->notifyEvent( EVENT_POST_ALBUM_ADD, Array( "album" => &$album ));								
 				// clear the cache if everything went fine
-				CacheControl::resetBlogCache( $this->_blogInfo->getId());
+				CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
             }
             else {
                 $this->_view->setErrorMessage( $this->_locale->tr("error_adding_album" ) );

Modified: plog/branches/plog-1.0.1/class/action/admin/admindeletearticlecategoryaction.class.php
===================================================================
--- plog/branches/plog-1.0.1/class/action/admin/admindeletearticlecategoryaction.class.php	2005-05-05 23:27:57 UTC (rev 1950)
+++ plog/branches/plog-1.0.1/class/action/admin/admindeletearticlecategoryaction.class.php	2005-05-05 23:31:06 UTC (rev 1951)
@@ -93,7 +93,7 @@
 				$this->_view->setErrorMessage( $errorMessage );
 			if( $successMessage != "" ) {
 				// and clear the cache to avoid outdated information
-				CacheControl::resetBlogCache( $this->_blogInfo->getId());			
+				CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );			
 				$this->_view->setSuccessMessage( $successMessage );
 			}
 				

Modified: plog/branches/plog-1.0.1/class/action/admin/admindeletegalleryitemsaction.class.php
===================================================================
--- plog/branches/plog-1.0.1/class/action/admin/admindeletegalleryitemsaction.class.php	2005-05-05 23:27:57 UTC (rev 1950)
+++ plog/branches/plog-1.0.1/class/action/admin/admindeletegalleryitemsaction.class.php	2005-05-05 23:31:06 UTC (rev 1951)
@@ -66,7 +66,7 @@
 			$this->setCommonData();
 			
 			// clear the cache
-			CacheControl::resetBlogCache( $this->_blogInfo->getId());
+			CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
 
             // better to return true if everything fine
             return true;		

Modified: plog/branches/plog-1.0.1/class/action/admin/admindeletelinkaction.class.php
===================================================================
--- plog/branches/plog-1.0.1/class/action/admin/admindeletelinkaction.class.php	2005-05-05 23:27:57 UTC (rev 1950)
+++ plog/branches/plog-1.0.1/class/action/admin/admindeletelinkaction.class.php	2005-05-05 23:31:06 UTC (rev 1951)
@@ -91,7 +91,7 @@
             $this->setCommonData();
 			
 			// clear the cache
-			CacheControl::resetBlogCache( $this->_blogInfo->getId());
+			CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
 
             // better to return true if everything fine
             return true;

Modified: plog/branches/plog-1.0.1/class/action/admin/admindeletelinkcategoryaction.class.php
===================================================================
--- plog/branches/plog-1.0.1/class/action/admin/admindeletelinkcategoryaction.class.php	2005-05-05 23:27:57 UTC (rev 1950)
+++ plog/branches/plog-1.0.1/class/action/admin/admindeletelinkcategoryaction.class.php	2005-05-05 23:31:06 UTC (rev 1951)
@@ -94,7 +94,7 @@
 			if( $successMessage != "" ) {
 				$this->_view->setSuccessMessage( $successMessage );
 				// clear the cache
-				CacheControl::resetBlogCache( $this->_blogInfo->getId());
+				CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
 			}
 				
             $this->setCommonData();

Modified: plog/branches/plog-1.0.1/class/action/admin/admindeletereferreraction.class.php
===================================================================
--- plog/branches/plog-1.0.1/class/action/admin/admindeletereferreraction.class.php	2005-05-05 23:27:57 UTC (rev 1950)
+++ plog/branches/plog-1.0.1/class/action/admin/admindeletereferreraction.class.php	2005-05-05 23:31:06 UTC (rev 1951)
@@ -95,7 +95,7 @@
 			
 			if( $clearCache ) {
 				// clear the cache if needed
-				CacheControl::resetBlogCache( $this->_blogInfo->getId());			
+				CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );			
 			}
 
             $this->_view = new AdminReferrersView( $this->_blogInfo );

Modified: plog/branches/plog-1.0.1/class/action/admin/admindeleteresourceaction.class.php
===================================================================
--- plog/branches/plog-1.0.1/class/action/admin/admindeleteresourceaction.class.php	2005-05-05 23:27:57 UTC (rev 1950)
+++ plog/branches/plog-1.0.1/class/action/admin/admindeleteresourceaction.class.php	2005-05-05 23:31:06 UTC (rev 1951)
@@ -63,7 +63,7 @@
 				$this->notifyEvent( EVENT_PRE_RESOURCE_DELETE, Array( "resource" => &$resource ));
 
 				// clear the cache if everything went fine
-				CacheControl::resetBlogCache( $this->_blogInfo->getId());
+				CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
 			}
             else 
 				$this->_view->setErrorMessage( $this->_locale->pr("error_deleting_resource", $resource->getFileName()));

Modified: plog/branches/plog-1.0.1/class/action/admin/admindeleteresourcealbumaction.class.php
===================================================================
--- plog/branches/plog-1.0.1/class/action/admin/admindeleteresourcealbumaction.class.php	2005-05-05 23:27:57 UTC (rev 1950)
+++ plog/branches/plog-1.0.1/class/action/admin/admindeleteresourcealbumaction.class.php	2005-05-05 23:31:06 UTC (rev 1951)
@@ -69,7 +69,7 @@
 					$this->_view->setSuccessMessage( $this->_locale->pr("album_deleted_ok", $album->getName()));
 					$this->notifyEvent( EVENT_PRE_ALBUM_DELETE, Array( "album" => &$album ));						
 					// clear the cache
-					CacheControl::resetBlogCache( $this->_blogInfo->getId());
+					CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
 				}
                	else {
                		$this->_view->setErrorMessage( $this->_locale->pr("error_deleting_album", $album->getName()));

Modified: plog/branches/plog-1.0.1/class/action/admin/adminupdatelinkaction.class.php
===================================================================
--- plog/branches/plog-1.0.1/class/action/admin/adminupdatelinkaction.class.php	2005-05-05 23:27:57 UTC (rev 1950)
+++ plog/branches/plog-1.0.1/class/action/admin/adminupdatelinkaction.class.php	2005-05-05 23:31:06 UTC (rev 1951)
@@ -89,7 +89,7 @@
 			$this->notifyEvent( EVENT_POST_LINK_UPDATE, Array( "link" => &$link ));			
 			
 			// clear the cache
-			CacheControl::resetBlogCache( $this->_blogInfo->getId());
+			CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
 			
 			// and go back to the view with the list of links
             $this->_view = new AdminLinksListView( $this->_blogInfo );

Modified: plog/branches/plog-1.0.1/class/action/admin/adminupdatelinkcategoryaction.class.php
===================================================================
--- plog/branches/plog-1.0.1/class/action/admin/adminupdatelinkcategoryaction.class.php	2005-05-05 23:27:57 UTC (rev 1950)
+++ plog/branches/plog-1.0.1/class/action/admin/adminupdatelinkcategoryaction.class.php	2005-05-05 23:31:06 UTC (rev 1951)
@@ -65,7 +65,7 @@
 			$this->notifyEvent( EVENT_POST_LINK_CATEGORY_UPDATE, Array( "linkcategory" => &$category ));			
 			
 			// clear the cache
-			CacheControl::resetBlogCache( $this->_blogInfo->getId());			
+			CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
 
             $this->_view = new AdminLinkCategoriesListView( $this->_blogInfo );
             $this->_view->setSuccessMessage( $this->_locale->pr("link_category_updated_ok", $category->getName()));

Modified: plog/branches/plog-1.0.1/class/action/admin/adminupdateresourceaction.class.php
===================================================================
--- plog/branches/plog-1.0.1/class/action/admin/adminupdateresourceaction.class.php	2005-05-05 23:27:57 UTC (rev 1950)
+++ plog/branches/plog-1.0.1/class/action/admin/adminupdateresourceaction.class.php	2005-05-05 23:31:06 UTC (rev 1951)
@@ -85,7 +85,7 @@
 				$this->notifyEvent( EVENT_POST_RESOURCE_UPDATE, Array( "resource" => &$resource ));				
 				
 				// clear the cache
-				CacheControl::resetBlogCache( $this->_blogInfo->getId());				
+				CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
             }
 
             $this->setCommonData();

Modified: plog/branches/plog-1.0.1/class/action/admin/adminupdateresourcealbumaction.class.php
===================================================================
--- plog/branches/plog-1.0.1/class/action/admin/adminupdateresourcealbumaction.class.php	2005-05-05 23:27:57 UTC (rev 1950)
+++ plog/branches/plog-1.0.1/class/action/admin/adminupdateresourcealbumaction.class.php	2005-05-05 23:31:06 UTC (rev 1951)
@@ -88,7 +88,7 @@
             $this->setCommonData();
 			
 			// clear the cache
-			CacheControl::resetBlogCache( $this->_blogInfo->getId());			
+			CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
 
             // better to return true if everything fine
             return true;




More information about the pLog-svn mailing list