Browse Source

Expire starred lists after 1 day

master
Nemo 1 year ago
parent
commit
6831d9af98
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      app.rb

+ 2
- 0
app.rb View File

@@ -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


Loading…
Cancel
Save