Method: Redis::Commands::Keys#pexpire
- Defined in:
- lib/redis/commands/keys.rb
#pexpire(key, milliseconds, nx: nil, xx: nil, gt: nil, lt: nil) ⇒ Boolean
Set a key's time to live in milliseconds.
146 147 148 149 150 151 152 153 154 |
# File 'lib/redis/commands/keys.rb', line 146 def pexpire(key, milliseconds, nx: nil, xx: nil, gt: nil, lt: nil) args = [:pexpire, key, Integer(milliseconds)] args << "NX" if nx args << "XX" if xx args << "GT" if gt args << "LT" if lt send_command(args, &Boolify) end |