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:
e278cf4
)
Fix bug in OOM avoidance for RepoGroup cache.
author
Aaron Schulz
<aschulz@wikimedia.org>
Wed, 24 Apr 2013 00:17:50 +0000
(17:17 -0700)
committer
Aaron Schulz
<aschulz@wikimedia.org>
Wed, 24 Apr 2013 00:22:30 +0000
(17:22 -0700)
Change-Id: Ic2e7fb6a9a7207315fd65454d883b84278efafc0
includes/filerepo/file/LocalFile.php
patch
|
blob
|
history
diff --git
a/includes/filerepo/file/LocalFile.php
b/includes/filerepo/file/LocalFile.php
index
8bd8376
..
325c673
100644
(file)
--- a/
includes/filerepo/file/LocalFile.php
+++ b/
includes/filerepo/file/LocalFile.php
@@
-1663,11
+1663,11
@@
class LocalFile extends File {
}
/**
- * @return bool
+ * @return bool
Whether to cache in RepoGroup (this avoids OOMs)
*/
function isCacheable() {
- $this->load();
- return
strlen( $this->metadata ) <= self::CACHE_FIELD_MAX_LEN; // avoid OOMs
+ $this->load();
// if loaded from cache, metadata will be null if it didn't fit
+ return
$this->metadata !== null && strlen( $this->metadata ) <= self::CACHE_FIELD_MAX_LEN;
}
/**