Skip to content

Commit b6bc399

Browse files
committed
Add missing hexpire and httl in distributed
1 parent 2c4eaac commit b6bc399

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/redis/distributed.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,16 @@ def hmset(key, *attrs)
858858
node_for(key).hmset(key, *attrs)
859859
end
860860

861+
# Set the expiration for hash fields in seconds
862+
def hexpire(key, ttl, *fields)
863+
node_for(key).hexpire(key, ttl, *fields)
864+
end
865+
866+
# Returns the ttl of the hash fields
867+
def httl(key, *fields)
868+
node_for(key).httl(key, *fields)
869+
end
870+
861871
def mapped_hmset(key, hash)
862872
node_for(key).hmset(key, hash)
863873
end

0 commit comments

Comments
 (0)