From: Aaron Schulz Date: Tue, 27 Jan 2015 01:14:33 +0000 (-0800) Subject: Removed unused and poorly supported time argument to BagOStuff::delete X-Git-Tag: 1.31.0-rc.0~12508^2 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=13d1a86eef197b0c00ab2a94131841e2bb69173d;p=lhc%2Fweb%2Fwiklou.git Removed unused and poorly supported time argument to BagOStuff::delete Change-Id: I8f90f480ec8bc70605c85c39f73f29df21d1927d --- diff --git a/includes/objectcache/APCBagOStuff.php b/includes/objectcache/APCBagOStuff.php index d879ca8416..598692efdb 100644 --- a/includes/objectcache/APCBagOStuff.php +++ b/includes/objectcache/APCBagOStuff.php @@ -79,10 +79,9 @@ class APCBagOStuff extends BagOStuff { /** * @param string $key - * @param int $time * @return bool */ - public function delete( $key, $time = 0 ) { + public function delete( $key ) { apc_delete( $key ); return true; diff --git a/includes/objectcache/BagOStuff.php b/includes/objectcache/BagOStuff.php index 0a2344688b..1a4514d531 100644 --- a/includes/objectcache/BagOStuff.php +++ b/includes/objectcache/BagOStuff.php @@ -58,9 +58,6 @@ abstract class BagOStuff { $this->debugMode = $bool; } - /* *** THE GUTS OF THE OPERATION *** */ - /* Override these with functional things in subclasses */ - /** * Get an item with the given key. Returns false if it does not exist. * @param string $key @@ -91,10 +88,9 @@ abstract class BagOStuff { /** * Delete an item. * @param string $key - * @param int $time Amount of time to delay the operation (mostly memcached-specific) * @return bool True if the item was deleted or not found, false on failure */ - abstract public function delete( $key, $time = 0 ); + abstract public function delete( $key ); /** * Merge changes into the existing cache value (possibly creating a new one). diff --git a/includes/objectcache/EmptyBagOStuff.php b/includes/objectcache/EmptyBagOStuff.php index 9595b83ce8..dbc57b98f8 100644 --- a/includes/objectcache/EmptyBagOStuff.php +++ b/includes/objectcache/EmptyBagOStuff.php @@ -60,10 +60,9 @@ class EmptyBagOStuff extends BagOStuff { /** * @param string $key - * @param int $time * @return bool */ - function delete( $key, $time = 0 ) { + function delete( $key ) { return true; } diff --git a/includes/objectcache/HashBagOStuff.php b/includes/objectcache/HashBagOStuff.php index 06a08655e9..08bb1f905f 100644 --- a/includes/objectcache/HashBagOStuff.php +++ b/includes/objectcache/HashBagOStuff.php @@ -98,10 +98,9 @@ class HashBagOStuff extends BagOStuff { /** * @param string $key - * @param int $time * @return bool */ - function delete( $key, $time = 0 ) { + function delete( $key ) { if ( !isset( $this->bag[$key] ) ) { return false; } diff --git a/includes/objectcache/MemcachedBagOStuff.php b/includes/objectcache/MemcachedBagOStuff.php index 0e133a8813..9e62610641 100644 --- a/includes/objectcache/MemcachedBagOStuff.php +++ b/includes/objectcache/MemcachedBagOStuff.php @@ -91,11 +91,10 @@ class MemcachedBagOStuff extends BagOStuff { /** * @param string $key - * @param int $time * @return bool */ - public function delete( $key, $time = 0 ) { - return $this->client->delete( $this->encodeKey( $key ), $time ); + public function delete( $key ) { + return $this->client->delete( $this->encodeKey( $key ) ); } /** diff --git a/includes/objectcache/MemcachedPeclBagOStuff.php b/includes/objectcache/MemcachedPeclBagOStuff.php index 7c0a6456aa..913f9e3491 100644 --- a/includes/objectcache/MemcachedPeclBagOStuff.php +++ b/includes/objectcache/MemcachedPeclBagOStuff.php @@ -151,12 +151,11 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff { /** * @param string $key - * @param int $time * @return bool */ - public function delete( $key, $time = 0 ) { + public function delete( $key ) { $this->debugLog( "delete($key)" ); - $result = parent::delete( $key, $time ); + $result = parent::delete( $key ); if ( $result === false && $this->client->getResultCode() === Memcached::RES_NOTFOUND ) { // "Not found" is counted as success in our interface return true; diff --git a/includes/objectcache/MultiWriteBagOStuff.php b/includes/objectcache/MultiWriteBagOStuff.php index 04ed89478c..4b678166e5 100644 --- a/includes/objectcache/MultiWriteBagOStuff.php +++ b/includes/objectcache/MultiWriteBagOStuff.php @@ -99,11 +99,10 @@ class MultiWriteBagOStuff extends BagOStuff { /** * @param string $key - * @param int $time * @return bool */ - public function delete( $key, $time = 0 ) { - return $this->doWrite( 'delete', $key, $time ); + public function delete( $key ) { + return $this->doWrite( 'delete', $key ); } /** diff --git a/includes/objectcache/RedisBagOStuff.php b/includes/objectcache/RedisBagOStuff.php index 6836f74872..8e4fa4d564 100644 --- a/includes/objectcache/RedisBagOStuff.php +++ b/includes/objectcache/RedisBagOStuff.php @@ -147,7 +147,7 @@ class RedisBagOStuff extends BagOStuff { return $result; } - public function delete( $key, $time = 0 ) { + public function delete( $key ) { list( $server, $conn ) = $this->getConnection( $key ); if ( !$conn ) { diff --git a/includes/objectcache/SqlBagOStuff.php b/includes/objectcache/SqlBagOStuff.php index 7524240895..6c06cb51c6 100644 --- a/includes/objectcache/SqlBagOStuff.php +++ b/includes/objectcache/SqlBagOStuff.php @@ -446,10 +446,9 @@ class SqlBagOStuff extends BagOStuff { /** * @param string $key - * @param int $time * @return bool */ - public function delete( $key, $time = 0 ) { + public function delete( $key ) { list( $serverIndex, $tableName ) = $this->getTableByKey( $key ); try { $db = $this->getDB( $serverIndex ); diff --git a/includes/objectcache/WinCacheBagOStuff.php b/includes/objectcache/WinCacheBagOStuff.php index 78a512ceab..8a71b884a1 100644 --- a/includes/objectcache/WinCacheBagOStuff.php +++ b/includes/objectcache/WinCacheBagOStuff.php @@ -81,10 +81,9 @@ class WinCacheBagOStuff extends BagOStuff { * Remove a value from the WinCache object cache * * @param string $key Cache key - * @param int $time Not used in this implementation * @return bool */ - public function delete( $key, $time = 0 ) { + public function delete( $key ) { wincache_ucache_delete( $key ); return true; diff --git a/includes/objectcache/XCacheBagOStuff.php b/includes/objectcache/XCacheBagOStuff.php index d7603b11f5..10baee0b1d 100644 --- a/includes/objectcache/XCacheBagOStuff.php +++ b/includes/objectcache/XCacheBagOStuff.php @@ -85,10 +85,9 @@ class XCacheBagOStuff extends BagOStuff { * Remove a value from the XCache object cache * * @param string $key Cache key - * @param int $time Not used in this implementation * @return bool */ - public function delete( $key, $time = 0 ) { + public function delete( $key ) { xcache_unset( $key ); return true; }