Expire starred lists after 1 day

Este commit está contenido en:
Nemo 2018-06-04 14:33:12 +05:30
padre 87ec543f84
commit 6831d9af98
Se han modificado 1 ficheros con 2 adiciones y 0 borrados

2
app.rb
Ver fichero

@ -43,6 +43,8 @@ class MyApp < Sinatra::Base
time = Time.now.to_i
settings.r.set "#{user}.repos", repos
settings.r.set "#{user}.repos.time", time
# Keep the starred repo list for 1 day
settings.r.expire "#{user}.repos", 60*60*24
[repos, time]
end