# A more efficient Redis lock

**URL:** <https://meta.discourse.org/t/a-more-efficient-redis-lock/177841>\
**Category:** Development\
**Created:** [January 31, 2021, 1:10pm UTC](https://meta.discourse.org/t/a-more-efficient-redis-lock/177841 "2021-01-31T13:10:02Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [January 31, 2021, 11:22pm UTC](https://meta.discourse.org/t/a-more-efficient-redis-lock/177841/2 "2021-01-31T23:22:15Z")

</div>

Per [Develop with Redis | Docs](https://redis.io/topics/distlock)

We can probably junk the whole transaction and do a set with with the px and nx options

---

_[View the full topic](https://meta.discourse.org/t/a-more-efficient-redis-lock/177841)._
