<!doctypehtml><html lang=en-US><meta charset=utf-8><meta content=IE=edge http-equiv=X-UA-Compatible><meta content=width=device-width,initial-scale=1 name=viewport><title>
   StackExchange.Redis | General purpose redis client
  </title><meta content="Jekyll v3.9.0"name=generator><meta content=StackExchange.Redis property=og:title><meta content=en_US property=og:locale><meta content="General purpose redis client"name=description><meta content="General purpose redis client"property=og:description><link href=https://stackexchange.github.io/StackExchange.Redis/ rel=canonical><meta content=https://stackexchange.github.io/StackExchange.Redis/ property=og:url><meta content=StackExchange.Redis property=og:site_name><meta content=summary name=twitter:card><meta content=StackExchange.Redis property=twitter:title><script type=application/ld+json>
   {"description":"General purpose redis client","url":"https://stackexchange.github.io/StackExchange.Redis/","@type":"WebSite","headline":"StackExchange.Redis","name":"StackExchange.Redis","@context":"https://schema.org"}
  </script><link href=/StackExchange.Redis/assets/css/style.css?v=8298d4c152d46aecb8720e9e515ba24c1ef995f5 rel=stylesheet><body><div class="container-lg px-3 my-5 markdown-body"><h1 id=stackexchangeredis>StackExchange.Redis</h1><p><a href=ReleaseNotes> Release Notes </a><h2 id=overview>Overview</h2><p>StackExchange.Redis is a high performance general purpose redis client for .NET languages (C#, etc.). It is the logical successor to <a href=https://code.google.com/archive/p/booksleeve/> BookSleeve </a> , and is the client developed-by (and used-by) <a href=http://stackexchange.com/> Stack Exchange </a> for busy sites like <a href=http://stackoverflow.com/> Stack Overflow </a> . For the full reasons why this library was created (i.e. “What about BookSleeve?”) <a href=http://marcgravell.blogspot.com/2014/03/so-i-went-and-wrote-another-redis-client.html> please see here </a> .<h2 id=features>Features</h2><ul><li>High performance multiplexed design, allowing for efficient use of shared connections from multiple calling threads<li>Abstraction over redis node configuration: the client can silently negotiate multiple redis servers for robustness and availability<li>Convenient access to the full redis feature-set<li>Full dual programming model both synchronous and asynchronous usage, without requiring “sync over async” usage of the <a href=http://msdn.microsoft.com/en-us/library/dd460717%28v=vs.110%29.aspx> TPL </a><li>Support for redis “cluster”</ul><h2 id=installation>Installation</h2><p>StackExchange.Redis can be installed via the nuget UI (as <a href=https://www.nuget.org/packages/StackExchange.Redis/> StackExchange.Redis </a> ), or via the nuget package manager console:<pre><code class=language-PowerShell>PM> Install-Package StackExchange.Redis
</code></pre><h2 id=documentation>Documentation</h2><ul><li><a href=Server> Server </a> - running a redis server<li><a href=Basics> Basic Usage </a> - getting started and basic usage<li><a href=Configuration> Configuration </a> - options available when connecting to redis<li><a href=PipelinesMultiplexers> Pipelines and Multiplexers </a> - what is a multiplexer?<li><a href=KeysValues> Keys, Values and Channels </a> - discusses the data-types used on the API<li><a href=Transactions> Transactions </a> - how atomic transactions work in redis<li><a href=Events> Events </a> - the events available for logging / information purposes<li><a href=PubSubOrder> Pub/Sub Message Order </a> - advice on sequential and concurrent processing<li><a href=Streams> Streams </a> - how to use the Stream data type<li><a href=KeysScan> Where are <code class="language-plaintext highlighter-rouge">
       KEYS
      </code> / <code class="language-plaintext highlighter-rouge">
       SCAN
      </code> / <code class="language-plaintext highlighter-rouge">
       FLUSH*
      </code> ? </a> - how to use server-based commands<li><a href=Profiling> Profiling </a> - profiling interfaces, as well as how to profile in an <code class="language-plaintext highlighter-rouge">
      async
     </code> world<li><a href=Scripting> Scripting </a> - running Lua scripts with convenient named parameter replacement<li><a href=Testing> Testing </a> - running the <code class="language-plaintext highlighter-rouge">
      StackExchange.Redis.Tests
     </code> suite to validate changes<li><a href=ThreadTheft> Thread Theft </a> - guidance on avoiding TPL threading problems</ul><h2 id=questions-and-contributions>Questions and Contributions</h2><p>If you think you have found a bug or have a feature request, please <a href=https://github.com/StackExchange/StackExchange.Redis/issues?state=open> report an issue </a> , or if appropriate: submit a pull request. If you have a question, feel free to <a href=https://github.com/mgravell> contact me </a> .<div class="footer border-top border-gray-light mt-5 pt-3 text-right text-gray">This site is open source. <a href=https://github.com/StackExchange/StackExchange.Redis/edit/main/docs/index.md> Improve this page </a> .</div></div><script crossorigin integrity=sha256-lZaRhKri35AyJSypXXs4o6OPFTbTmUoltBbDCbdzegg= src=https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.0/anchor.min.js></script><script>anchors.add();</script>