[FileBackend] Tweaked various cache parameters and bumped tiny Swift auth TTL a bit.
authorAaron <aschulz@wikimedia.org>
Wed, 25 Apr 2012 21:21:49 +0000 (14:21 -0700)
committerAaron <aschulz@wikimedia.org>
Thu, 26 Apr 2012 17:38:32 +0000 (10:38 -0700)
Change-Id: Ibb1a43624a94ff737e9f5c73a0bedec75aba37ff

includes/filerepo/backend/FileBackendStore.php
includes/filerepo/backend/SwiftFileBackend.php

index f7e4529..6af6480 100644 (file)
 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)
index af5d693..10faeb2 100644 (file)
@@ -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']
                        : '';