title: Block access to Redis key (ServiceStack)
body: <p>I'm trying to implement what I would think is a very common caching scenario using the ServiceStack Redis client, yet I'm having difficulty finding a good example of this.</p>
  
  <p>In an ASP.NET MVC app, we make a relatively long-running (and metered) call to an external web service and cache the results for a certain period of time. In the cache implementation, it is desired to block additional requests for that key until the web service call has completed, to avoid additional (expensive) calls.</p>
  
  <p>So, what is the best way to implement a key-level lock? Does Redis support this out of the box? Would ServiceStack's <a href="https://github.com/ServiceStack/ServiceStack.Redis/wiki/RedisLocks" rel="nofollow noreferrer">IRedisClient.AcquireLock</a> be a good fit for this, or is it overkill if we're not dealing with distributed locks? Or would I be best off just implementing the lock myself, something like described <a href="https://stackoverflow.com/questions/5578744/doing-locking-in-asp-net-correctly">here</a>?</p>
  
  <p>Thanks in advance!</p>