From: Aaron Date: Wed, 25 Apr 2012 21:21:49 +0000 (-0700) Subject: [FileBackend] Tweaked various cache parameters and bumped tiny Swift auth TTL a bit. X-Git-Tag: 1.31.0-rc.0~23807^2 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=d6d4fb12194dd616eab224516ba8f7ca6d300f21;p=lhc%2Fweb%2Fwiklou.git [FileBackend] Tweaked various cache parameters and bumped tiny Swift auth TTL a bit. Change-Id: Ibb1a43624a94ff737e9f5c73a0bedec75aba37ff --- diff --git a/includes/filerepo/backend/FileBackendStore.php b/includes/filerepo/backend/FileBackendStore.php index f7e4529fae..6af6480aee 100644 --- a/includes/filerepo/backend/FileBackendStore.php +++ b/includes/filerepo/backend/FileBackendStore.php @@ -21,10 +21,10 @@ abstract class FileBackendStore extends FileBackend { /** @var Array Map of paths to small (RAM/disk) cache items */ protected $cache = array(); // (storage path => key => value) - protected $maxCacheSize = 100; // integer; max paths with entries + protected $maxCacheSize = 300; // integer; max paths with entries /** @var Array Map of paths to large (RAM/disk) cache items */ protected $expensiveCache = array(); // (storage path => key => value) - protected $maxExpensiveCacheSize = 10; // integer; max paths with entries + protected $maxExpensiveCacheSize = 5; // integer; max paths with entries /** @var Array Map of container names to sharding settings */ protected $shardViaHashLevels = array(); // (container name => config array) diff --git a/includes/filerepo/backend/SwiftFileBackend.php b/includes/filerepo/backend/SwiftFileBackend.php index af5d693dd8..10faeb27fe 100644 --- a/includes/filerepo/backend/SwiftFileBackend.php +++ b/includes/filerepo/backend/SwiftFileBackend.php @@ -24,7 +24,7 @@ class SwiftFileBackend extends FileBackendStore { protected $auth; // Swift authentication handler protected $authTTL; // integer seconds protected $swiftAnonUser; // string; username to handle unauthenticated requests - protected $maxContCacheSize = 100; // integer; max containers with entries + protected $maxContCacheSize = 300; // integer; max containers with entries /** @var CF_Connection */ protected $conn; // Swift connection handle @@ -57,7 +57,7 @@ class SwiftFileBackend extends FileBackendStore { // Optional settings $this->authTTL = isset( $config['swiftAuthTTL'] ) ? $config['swiftAuthTTL'] - : 120; // some sane number + : 5 * 60; // some sane number $this->swiftAnonUser = isset( $config['swiftAnonUser'] ) ? $config['swiftAnonUser'] : '';