[FileBackend] Removed likely surperflous memcached retry code.
authorAaron <aschulz@wikimedia.org>
Tue, 15 May 2012 01:26:56 +0000 (18:26 -0700)
committerAaron <aschulz@wikimedia.org>
Tue, 15 May 2012 01:26:56 +0000 (18:26 -0700)
Change-Id: I934cd658d14c051f99f72d7e37e12f8646e59458

includes/filerepo/backend/FileBackendStore.php

index 201f40f..1a7bd06 100644 (file)
@@ -1288,12 +1288,9 @@ abstract class FileBackendStore extends FileBackend {
         * @return void
         */
        final protected function deleteContainerCache( $container ) {
-               for ( $attempts=1; $attempts <= 3; $attempts++ ) {
-                       if ( $this->memCache->delete( $this->containerCacheKey( $container ) ) ) {
-                               return; // done!
-                       }
+               if ( !$this->memCache->delete( $this->containerCacheKey( $container ) ) ) {
+                       trigger_error( "Unable to delete stat cache for container $container." );
                }
-               trigger_error( "Unable to delete stat cache for container $container." );
        }
 
        /**
@@ -1380,12 +1377,9 @@ abstract class FileBackendStore extends FileBackend {
         * @return void
         */
        final protected function deleteFileCache( $path ) {
-               for ( $attempts=1; $attempts <= 3; $attempts++ ) {
-                       if ( $this->memCache->delete( $this->fileCacheKey( $path ) ) ) {
-                               return; // done!
-                       }
+               if ( !$this->memCache->delete( $this->fileCacheKey( $path ) ) ) {
+                       trigger_error( "Unable to delete stat cache for file $path." );
                }
-               trigger_error( "Unable to delete stat cache for file $path." );
        }
 
        /**