Method: Redstruct::Struct#expire
- Defined in:
- lib/redstruct/struct.rb
#expire(ttl) ⇒ Boolean
Sets the key to expire after ttl seconds
33 34 35 36 |
# File 'lib/redstruct/struct.rb', line 33 def expire(ttl) ttl = (ttl.to_f * 1000).floor return coerce_bool(self.connection.pexpire(@key, ttl)) end |