Method: Redis::Commands::Keys#expireat
- Defined in:
- lib/redis/commands/keys.rb
#expireat(key, unix_time, nx: nil, xx: nil, gt: nil, lt: nil) ⇒ Boolean
Set the expiration for a key as a UNIX timestamp.
102 103 104 105 106 107 108 109 110 |
# File 'lib/redis/commands/keys.rb', line 102 def expireat(key, unix_time, nx: nil, xx: nil, gt: nil, lt: nil) args = [:expireat, key, Integer(unix_time)] args << "NX" if nx args << "XX" if xx args << "GT" if gt args << "LT" if lt send_command(args, &Boolify) end |