{"id":28700,"date":"2023-10-20T18:37:39","date_gmt":"2023-10-20T16:37:39","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=28700"},"modified":"2023-10-20T18:37:41","modified_gmt":"2023-10-20T16:37:41","slug":"redis-how-transactions-work-in-redis","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/","title":{"rendered":"Redis: How transactions work in Redis"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"h-introduction\">Introduction:<\/h2>\n\n\n\n<p>Redis allows you to use many commands to create and administrate your database.<\/p>\n\n\n\n<p>There is especially one useful feature which which allows you to execute a series of commands as a single unit of work:<\/p>\n\n\n\n<p>The Redis transactions!<\/p>\n\n\n\n<p>In this post will check how it works how it can be useful for your daily work.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-do-transactions-work\">How do transactions work?<\/h2>\n\n\n\n<p>Transactions allows to send a block of commands, using the the <strong>MULTI <\/strong>command.<\/p>\n\n\n\n<p>All the commands will be queued the when using the EXEC command it will be executed.<\/p>\n\n\n\n<p>Note:<\/p>\n\n\n\n<p>A request sent by another client will never be served in the middle of the execution of a Redis Transaction. &#8220;<strong>This guarantees that the commands are executed as a single isolated operation<\/strong>&#8220;<\/p>\n\n\n\n<p>Here is a quick example :<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"617\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-13-1024x617.png\" alt=\"\" class=\"wp-image-28710\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-13-1024x617.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-13-300x181.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-13-768x463.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-13.png 1175w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>In a row, we created a key &#8220;PLAYERS&#8221; with the player name and their associated number, then we wanted it to be displayed using the command.<\/p>\n\n\n\n<p>The EXEC command will commit all these actions.<\/p>\n\n\n\n<p><span style=\"text-decoration: underline\"><strong>Note:<\/strong><\/span><\/p>\n\n\n\n<p>When using the <strong>MULTI <\/strong>command, the inputs are not executed until the <strong>EXEC <\/strong>command is done.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-are-the-benefits-of-redis-transactions\">What are the benefits of Redis transactions?<\/h2>\n\n\n\n<p id=\"c5c0\">First one is that transactions are atomic. In other words all of the commands in the transaction are completed or none of them are. <\/p>\n\n\n\n<p id=\"c5c0\">This is an essential point for ensuring the consistency of your data, so that you don&#8217;t end up in a situation where certain commands in the transaction have been executed, but not others.<\/p>\n\n\n\n<p id=\"a003\">Other good point, transactions in Redis are very fast. <\/p>\n\n\n\n<p id=\"a003\">Remember Redis works as an in-memory database, it&#8217;s a reason it can execute transactions very quickly.<\/p>\n\n\n\n<p id=\"a003\">This makes it ideal for use cases where you need to make multiple changes to your data in a short period of time.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-about-rollbacks\">Are rollbacks possible?<\/h2>\n\n\n\n<p>Unfortunately not, but there is a good reason:<\/p>\n\n\n\n<p>Supporting rollbacks would have a significant <strong>impact on the simplicity and performance<\/strong> of Redis.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-discard-a-transaction\">How to discard a transaction?<\/h2>\n\n\n\n<p>You can use the <strong>DISCARD <\/strong>command to abort your transaction.<\/p>\n\n\n\n<p>After that all it will not execute the commands within the transaction and your data will be restored to normal.<\/p>\n\n\n\n<p><strong>Here is an example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"433\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-14-1024x433.png\" alt=\"\" class=\"wp-image-28722\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-14-1024x433.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-14-300x127.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-14-768x325.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-14-1536x649.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-14.png 1594w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>As you can see, the <strong>NUMBERS <\/strong>value remained the same 123456789<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-watch-command\">Watch command <\/h2>\n\n\n\n<p>Watch main function is to monitor keys, this command  will make the <a href=\"https:\/\/redis.io\/commands\/exec\"><code>EXEC<\/code><\/a> conditional:<\/p>\n\n\n\n<p>Following that principle, <a href=\"https:\/\/redis.io\/commands\/exec\"><code>EXEC<\/code><\/a> performs the transaction <strong>on the key only if this key is not<\/strong> <a href=\"https:\/\/redis.io\/commands\/watch\"><code>WATCH<\/code><\/a>ed <\/p>\n\n\n\n<p>This includes modifications made by the client, like write commands, and by Redis itself, like expiration or eviction. <\/p>\n\n\n\n<p>If keys were modified between when they were <a href=\"https:\/\/redis.io\/commands\/watch\"><code>WATCH<\/code><\/a>ed and when the <a href=\"https:\/\/redis.io\/commands\/exec\"><code>EXEC<\/code><\/a> was received, the entire transaction will be aborted instead.<\/p>\n\n\n\n<p><strong>Below an example of watch command<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>1st user watch the key then start the transaction by updating the key value:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"956\" height=\"256\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-20.png\" alt=\"\" class=\"wp-image-28747\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-20.png 956w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-20-300x80.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-20-768x206.png 768w\" sizes=\"auto, (max-width: 956px) 100vw, 956px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In the mean time, the second user modifies the key with another value:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"955\" height=\"140\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-16.png\" alt=\"\" class=\"wp-image-28742\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-16.png 955w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-16-300x44.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-16-768x113.png 768w\" sizes=\"auto, (max-width: 955px) 100vw, 955px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>When the 1st user issues the EXEC command, the result is an error:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"955\" height=\"109\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-18.png\" alt=\"\" class=\"wp-image-28744\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-18.png 955w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-18-300x34.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-18-768x88.png 768w\" sizes=\"auto, (max-width: 955px) 100vw, 955px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>When we see the value of NUMBERS the modification was done by the 2nd user:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"955\" height=\"231\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-19.png\" alt=\"\" class=\"wp-image-28746\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-19.png 955w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-19-300x73.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-19-768x186.png 768w\" sizes=\"auto, (max-width: 955px) 100vw, 955px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You see now how the <strong>WATCH<\/strong> command prevents the <strong>EXEC<\/strong> from running<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-about-optimistic-locking\">What about Optimistic locking?<\/h2>\n\n\n\n<p>Redis is able to use a <strong>check and set <\/strong>method to lock the Redis transaction.<\/p>\n\n\n\n<p>For that we will use the <strong>WATCH <\/strong>command.<\/p>\n\n\n\n<p>I invite you to check the  Redis site to see some use cases on how optimistic locking is working<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"redis-scripting-and-transactions\">Redis scripting <\/h2>\n\n\n\n<p>Another solution is to use Redis scripts which are also transactional.<\/p>\n\n\n\n<p>That means that you can do the same actions as with a Redis Transaction,and usually the script will be both simpler and faster.<\/p>\n\n\n\n<p>You can have more info about scripts by following this <a href=\"https:\/\/redis.io\/commands\/eval\/\">link<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n\n\n\n<p>Now you know how to perform transactions in Redis, a useful feature to keep data consistency and in a very fast way \ud83d\ude42<\/p>\n\n\n\n<p>Feel free to check <a href=\"https:\/\/www.dbi-services.com\/blog\/author\/nabilsaoual\/\">my other posts <\/a>and also keep an eye on <a href=\"https:\/\/www.dbi-services.com\/blog\/\">dbi bloggers<\/a> for new tips and tricks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: Redis allows you to use many commands to create and administrate your database. There is especially one useful feature which which allows you to execute a series of commands as a single unit of work: The Redis transactions! In this post will check how it works how it can be useful for your daily [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1739],"tags":[947,2991],"type_dbi":[],"class_list":["post-28700","post","type-post","status-publish","format-standard","hentry","category-nosql","tag-nosql","tag-redis"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Redis: How transactions work in Redis - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Redis: How transactions work in Redis\" \/>\n<meta property=\"og:description\" content=\"Introduction: Redis allows you to use many commands to create and administrate your database. There is especially one useful feature which which allows you to execute a series of commands as a single unit of work: The Redis transactions! In this post will check how it works how it can be useful for your daily [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-20T16:37:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-20T16:37:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-13-1024x617.png\" \/>\n<meta name=\"author\" content=\"Middleware Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Middleware Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/\"},\"author\":{\"name\":\"Middleware Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1\"},\"headline\":\"Redis: How transactions work in Redis\",\"datePublished\":\"2023-10-20T16:37:39+00:00\",\"dateModified\":\"2023-10-20T16:37:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/\"},\"wordCount\":652,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-13-1024x617.png\",\"keywords\":[\"NoSQL\",\"Redis\"],\"articleSection\":[\"NoSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/\",\"name\":\"Redis: How transactions work in Redis - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-13-1024x617.png\",\"datePublished\":\"2023-10-20T16:37:39+00:00\",\"dateModified\":\"2023-10-20T16:37:41+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-13.png\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-13.png\",\"width\":1175,\"height\":708},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Redis: How transactions work in Redis\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1\",\"name\":\"Middleware Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"caption\":\"Middleware Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/middleware-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Redis: How transactions work in Redis - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/","og_locale":"en_US","og_type":"article","og_title":"Redis: How transactions work in Redis","og_description":"Introduction: Redis allows you to use many commands to create and administrate your database. There is especially one useful feature which which allows you to execute a series of commands as a single unit of work: The Redis transactions! In this post will check how it works how it can be useful for your daily [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/","og_site_name":"dbi Blog","article_published_time":"2023-10-20T16:37:39+00:00","article_modified_time":"2023-10-20T16:37:41+00:00","og_image":[{"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-13-1024x617.png","type":"","width":"","height":""}],"author":"Middleware Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Middleware Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/"},"author":{"name":"Middleware Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1"},"headline":"Redis: How transactions work in Redis","datePublished":"2023-10-20T16:37:39+00:00","dateModified":"2023-10-20T16:37:41+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/"},"wordCount":652,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-13-1024x617.png","keywords":["NoSQL","Redis"],"articleSection":["NoSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/","url":"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/","name":"Redis: How transactions work in Redis - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-13-1024x617.png","datePublished":"2023-10-20T16:37:39+00:00","dateModified":"2023-10-20T16:37:41+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-13.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-13.png","width":1175,"height":708},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/redis-how-transactions-work-in-redis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Redis: How transactions work in Redis"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1","name":"Middleware Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","caption":"Middleware Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/middleware-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/28700","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=28700"}],"version-history":[{"count":18,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/28700\/revisions"}],"predecessor-version":[{"id":28754,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/28700\/revisions\/28754"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=28700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=28700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=28700"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=28700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}