diff --git a/lib/github/kv.rb b/lib/github/kv.rb index 1a28209..9777a9a 100644 --- a/lib/github/kv.rb +++ b/lib/github/kv.rb @@ -328,7 +328,7 @@ def increment(key, amount: 1, expires: nil, touch_on_insert: false) `expires_at`=IF( concat('',`value`*1) = `value`, IF( - :touch, + :touch OR (`expires_at` IS NULL OR `expires_at`<:now), :expires, `expires_at` ),