dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e240272
)
Let's try limiting the language object cache... see if that fixes our problem with...
author
Brion Vibber
<brion@users.mediawiki.org>
Tue, 25 Nov 2008 19:38:22 +0000
(19:38 +0000)
committer
Brion Vibber
<brion@users.mediawiki.org>
Tue, 25 Nov 2008 19:38:22 +0000
(19:38 +0000)
languages/Language.php
patch
|
blob
|
history
diff --git
a/languages/Language.php
b/languages/Language.php
index
8e4c576
..
49a37ea
100644
(file)
--- a/
languages/Language.php
+++ b/
languages/Language.php
@@
-135,6
+135,10
@@
class Language {
*/
static function factory( $code ) {
if ( !isset( self::$mLangObjCache[$code] ) ) {
+ if( count( self::$mLangObjCache ) > 10 ) {
+ // Don't keep a billion objects around, that's stupid.
+ self::$mLangObjCache = array();
+ }
self::$mLangObjCache[$code] = self::newFromCode( $code );
}
return self::$mLangObjCache[$code];