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:
9d4d4b7
)
Don't clear objectcache on every query, I doubt there was any good reason for doing so
author
Tim Starling
<tstarling@users.mediawiki.org>
Sun, 27 Mar 2005 17:26:55 +0000
(17:26 +0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Sun, 27 Mar 2005 17:26:55 +0000
(17:26 +0000)
includes/ObjectCache.php
patch
|
blob
|
history
diff --git
a/includes/ObjectCache.php
b/includes/ObjectCache.php
index
b4bb22b
..
78ca511
100644
(file)
--- a/
includes/ObjectCache.php
+++ b/
includes/ObjectCache.php
@@
-315,11
+315,14
@@
class SqlBagOStuff extends BagOStuff {
}
function garbageCollect() {
- $nowtime = time();
- /* Avoid repeating the delete within a few seconds */
- if ( $nowtime > ($this->lastexpireall + 1) ) {
- $this->lastexpireall = $nowtime;
- $this->expireall();
+ /* Ignore 99% of requests */
+ if ( !mt_rand( 0, 100 ) ) {
+ $nowtime = time();
+ /* Avoid repeating the delete within a few seconds */
+ if ( $nowtime > ($this->lastexpireall + 1) ) {
+ $this->lastexpireall = $nowtime;
+ $this->expireall();
+ }
}
}