mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
slow down decay to accommodate for long polling and other tiny reqs
This commit is contained in:
parent
ef64c1b757
commit
2841434e36
1 changed files with 3 additions and 1 deletions
|
@ -60,7 +60,9 @@ module Middleware::UnicornOobgc
|
|||
new_delta = (delta * 1.5).to_i
|
||||
@max_delta = [new_delta, delta].min
|
||||
else
|
||||
new_delta = (delta * 0.99).to_i
|
||||
# this may seem like a very tiny decay rate, but some apps using caching
|
||||
# can really mess stuff up, if our delta is too low the algorithm fails
|
||||
new_delta = (delta * 0.995).to_i
|
||||
@max_delta = [new_delta, delta].max
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue