{"id":25171,"date":"2023-05-12T09:04:53","date_gmt":"2023-05-12T07:04:53","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=25171"},"modified":"2023-05-12T09:04:55","modified_gmt":"2023-05-12T07:04:55","slug":"redis-the-different-key-type-part2","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/","title":{"rendered":"Redis : The different Key Type Part2"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction:<\/h2>\n\n\n\n<p>Here is the second part of the Redis keys and features, we will see how to use, with a description from the official Redis site and some example for :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Hyperloglog<\/strong><\/li>\n\n\n\n<li><strong>BITMAP<\/strong><\/li>\n<\/ul>\n\n\n\n<p>So open your <strong>Redis-server<\/strong> and let&#8217;s check what is behind these different data types, and test some great features like:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>STREAMS<\/strong><\/li>\n\n\n\n<li><strong>PUB SUB<\/strong><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>The different Data type<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Redis HyperLogLog<\/strong><\/li>\n<\/ul>\n\n\n\n<p>Description:<\/p>\n\n\n\n<p><strong>HyperLogLog <\/strong>is a data structure that estimates the cardinality or the size of a set. As a probabilistic data structure, <strong>HyperLogLog <\/strong>trades perfect accuracy for efficient space utilization.<\/p>\n\n\n\n<p>The <strong>Redis HyperLogLog <\/strong>implementation uses up to <strong>12 <\/strong>KB and provides a standard error of 0.81%.<\/p>\n\n\n\n<p><strong>Basic command<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/redis.io\/commands\/pfadd\"><code>PFADD<\/code><\/a> adds an item to a HyperLogLog.<\/li>\n\n\n\n<li><a href=\"https:\/\/redis.io\/commands\/pfcount\"><code>PFCOUNT<\/code><\/a> returns an estimate of the number of items in the set.<\/li>\n\n\n\n<li><a href=\"https:\/\/redis.io\/commands\/pfmerge\"><code>PFMERGE<\/code><\/a> combines two or more HyperLogLogs into one.<\/li>\n<\/ul>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/1PART2.png\" alt=\"\" class=\"wp-image-25175\" width=\"930\" height=\"222\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/1PART2.png 978w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/1PART2-300x72.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/1PART2-768x184.png 768w\" sizes=\"auto, (max-width: 930px) 100vw, 930px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Limit<\/strong><\/li>\n<\/ul>\n\n\n\n<p>The <strong>HyperLogLog <\/strong>can estimate the cardinality of sets with up to 18,446,744,073,709,551,616 (<strong>2^64<\/strong>) members.<\/p>\n\n\n\n<p>Also to have a better understanding of <strong>Hyperloglog <\/strong>usage I advice you to check this great video from a Redis master <strong>Justin Castilla <\/strong><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Redis HyperLogLog Explained\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/MunL8nnwscQ?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Bitmaps (BitStrings)<\/strong><\/li>\n<\/ul>\n\n\n\n<p>Redis bitmaps are an extension of the string data type that lets you treat a string like a bit vector. You can also perform bitwise operations on one or more strings.<\/p>\n\n\n\n<p>It can be really useful for analytics and for counting \/ checking activity <\/p>\n\n\n\n<p><strong>Basic commands<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/redis.io\/commands\/setbit\"><code>SETBIT<\/code><\/a> sets a bit at the provided offset to 0 or 1.<\/li>\n\n\n\n<li><a href=\"https:\/\/redis.io\/commands\/getbit\"><code>GETBIT<\/code><\/a> returns the value of a bit at a given offset.<\/li>\n\n\n\n<li><a href=\"https:\/\/redis.io\/commands\/bitop\"><code>BITOP<\/code><\/a> lets you perform bitwise operations against one or more strings.<\/li>\n\n\n\n<li><a href=\"https:\/\/redis.io\/commands\/bitpos\"><code>BITPOS<\/code> <\/a>\u2013 Locate the first bit set to 1 or 0 in a string.<\/li>\n\n\n\n<li><code><a href=\"https:\/\/redis.io\/commands\/bitcount\">BITCOUNT<\/a><\/code> \u2013 Count the number of bits set to 1 in a string.<\/li>\n<\/ul>\n\n\n\n<p><strong>Example<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/1PART3.png\" alt=\"\" class=\"wp-image-25189\" width=\"937\" height=\"402\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/1PART3.png 976w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/1PART3-300x129.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/1PART3-768x330.png 768w\" sizes=\"auto, (max-width: 937px) 100vw, 937px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Redis Features<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>PUB SUB<\/strong> ( publish and subscribe ) <\/li>\n<\/ul>\n\n\n\n<p>Redis allows to set up a Publish-subscribe system where a &#8220;publisher&#8221; will be able to send a message which can then be listened by different &#8220;subscribers&#8221;.<\/p>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>I will create a channel named <strong>NABIL_INFO<\/strong> using this command:<\/li>\n<\/ul>\n\n\n\n<p><strong>127.0.0.1:6379&gt; PUBLISH channel &#8220;message&#8221;<\/strong> <\/p>\n\n\n\n<p>127.0.0.1:6379&gt; PUBLISH NABIL_INFO &#8220;Pele is the greatest&#8221; <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"862\" height=\"292\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-10.png\" alt=\"\" class=\"wp-image-25233\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-10.png 862w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-10-300x102.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-10-768x260.png 768w\" sizes=\"auto, (max-width: 862px) 100vw, 862px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>I will add a new message<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-4.png\" alt=\"\" class=\"wp-image-25218\" width=\"833\" height=\"348\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-4.png 625w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-4-300x125.png 300w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>I will <strong>SUBSCRIBE <\/strong>to this channel by opening a new Redis window and the below syntax<\/li>\n<\/ul>\n\n\n\n<p><code><strong>127.0.0.1:6379&gt; subscribe NABIL_INFO<\/strong><\/code><\/p>\n\n\n\n<p><code>127.0.0.1:6379&gt; subscribe channel  <\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"856\" height=\"265\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-5.png\" alt=\"\" class=\"wp-image-25220\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-5.png 856w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-5-300x93.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-5-768x238.png 768w\" sizes=\"auto, (max-width: 856px) 100vw, 856px\" \/><\/figure>\n\n\n\n<p><strong><span style=\"text-decoration: underline\">Important note:<\/span><\/strong><\/p>\n\n\n\n<p>As the message are not persistent, you will only the receive the message published <strong>AFTER <\/strong>your subscription<\/p>\n\n\n\n<p>I have subscribed to the channel on another Redis windows and I only receive the latest messages as you can see below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"861\" height=\"265\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-6.png\" alt=\"\" class=\"wp-image-25226\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-6.png 861w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-6-300x92.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-6-768x236.png 768w\" sizes=\"auto, (max-width: 861px) 100vw, 861px\" \/><\/figure>\n\n\n\n<p><strong>Basic commands<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/redis.io\/commands\/subscribe\"><code>SUBSCRIBE<\/code><\/a>  Subscribes the client to the specified channels.<\/li>\n\n\n\n<li><a href=\"https:\/\/redis.io\/commands\/unsubscribe\"><code>UNSUBSCRIBE<\/code><\/a> Unsubscribes the client from the given channels, or from all of them if none is given.<\/li>\n\n\n\n<li> <a href=\"https:\/\/redis.io\/commands\/publish\"><code>PUBLISH<\/code><\/a> Posts a message to the given channel.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>STREAMS<\/strong><\/li>\n<\/ul>\n\n\n\n<p>Definition:<\/p>\n\n\n\n<p>A Redis stream is a data structure that acts like an append-only log. You can use streams to record and simultaneously syndicate events in real time. Examples of Redis stream use cases include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Event sourcing (e.g., tracking user actions, clicks, etc.)<\/li>\n\n\n\n<li>Sensor monitoring (e.g., readings from devices in the field)<\/li>\n\n\n\n<li>Notifications (e.g., storing a record of each user&#8217;s notifications in a separate stream)<\/li>\n<\/ul>\n\n\n\n<p>Redis generates a unique ID for each stream entry. You can use these IDs to retrieve their associated entries later or to read and process all subsequent entries in the stream.<\/p>\n\n\n\n<p>Redis streams support several trimming strategies (to prevent streams from growing unbounded) and more than one consumption strategy (see <a href=\"https:\/\/redis.io\/commands\/xread\"><code>XREAD<\/code><\/a>, <a href=\"https:\/\/redis.io\/commands\/xreadgroup\"><code>XREADGROUP<\/code><\/a>, and <a href=\"https:\/\/redis.io\/commands\/xrange\"><code>XRANGE<\/code><\/a>).<\/p>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>127.0.0.1:6379<\/strong>&gt; XADD key &#091;NOMKSTREAM] &#091;MAXLEN|MINID &#091;=|~] threshold &#091;LIMIT count]] *|ID field value &#091;field value \u2026]\nWe will add the stats of Ronaldo R9 and update the stream each time he scores make an assist and make a dribble:\n<strong>127.0.0.1:6379<\/strong>&gt;XADD Barcelona:Ronaldo:R9 * GOALS 12 ASSISTS 09 SUCCESSFUL_DRIBBLE 46<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"977\" height=\"418\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-7.png\" alt=\"\" class=\"wp-image-25229\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-7.png 977w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-7-300x128.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-7-768x329.png 768w\" sizes=\"auto, (max-width: 977px) 100vw, 977px\" \/><\/figure>\n\n\n\n<p>Now we will Read the first three stream entries starting at ID <code>\"1683834574565-0\"<\/code>:<\/p>\n\n\n\n<p><code><strong>127.0.0.1:6379&gt;<\/strong> XRANGE Barcelona:Ronaldo:R9 1683834574565-0 + COUNT 3<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"980\" height=\"421\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-8.png\" alt=\"\" class=\"wp-image-25230\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-8.png 980w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-8-300x129.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-8-768x330.png 768w\" sizes=\"auto, (max-width: 980px) 100vw, 980px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We can also check the length of the stream:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"979\" height=\"566\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-9.png\" alt=\"\" class=\"wp-image-25231\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-9.png 979w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-9-300x173.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/image-9-768x444.png 768w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><\/figure>\n\n\n\n<p><strong>Basic commands<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/redis.io\/commands\/xadd\"><code>XADD<\/code><\/a> adds a new entry to a stream.<\/li>\n\n\n\n<li><a href=\"https:\/\/redis.io\/commands\/xread\"><code>XREAD<\/code><\/a> reads one or more entries, starting at a given position and moving forward in time.<\/li>\n\n\n\n<li><a href=\"https:\/\/redis.io\/commands\/xrange\"><code>XRANGE<\/code><\/a> returns a range of entries between two supplied entry IDs.<\/li>\n\n\n\n<li><a href=\"https:\/\/redis.io\/commands\/xlen\"><code>XLEN<\/code><\/a> returns the length of a stream.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion:<\/h2>\n\n\n\n<p>We have tested Redis data type and also seen some examples on how to use it.Also you know now how to use features like PUB SUB and STREAMS but it can be a topic where we can go deeper in the future.<\/p>\n\n\n\n<p>I forgot to talk about an interesting Redis data type which is <strong>Redis geospatial <\/strong>which is all about coordinate and location, I will make a post on it soon.<\/p>\n\n\n\n<p>I invite you to share with us and to visit <a href=\"https:\/\/www.dbi-services.com\/blog\/\">dbi blogger<\/a>s, also don&#8217;t forget to take a look on <a href=\"https:\/\/www.dbi-services.com\/blog\/author\/nabilsaoual\/\">my other blogs<\/a>, stay tuned for another post \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: Here is the second part of the Redis keys and features, we will see how to use, with a description from the official Redis site and some example for : So open your Redis-server and let&#8217;s check what is behind these different data types, and test some great features like: The different Data type [&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":[],"type_dbi":[],"class_list":["post-25171","post","type-post","status-publish","format-standard","hentry","category-nosql"],"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 : The different Key Type Part2 - 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-the-different-key-type-part2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Redis : The different Key Type Part2\" \/>\n<meta property=\"og:description\" content=\"Introduction: Here is the second part of the Redis keys and features, we will see how to use, with a description from the official Redis site and some example for : So open your Redis-server and let&#8217;s check what is behind these different data types, and test some great features like: The different Data type [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-12T07:04:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-12T07:04:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/1PART2.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=\"6 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-the-different-key-type-part2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/\"},\"author\":{\"name\":\"Middleware Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1\"},\"headline\":\"Redis : The different Key Type Part2\",\"datePublished\":\"2023-05-12T07:04:53+00:00\",\"dateModified\":\"2023-05-12T07:04:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/\"},\"wordCount\":715,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/1PART2.png\",\"articleSection\":[\"NoSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/\",\"name\":\"Redis : The different Key Type Part2 - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/1PART2.png\",\"datePublished\":\"2023-05-12T07:04:53+00:00\",\"dateModified\":\"2023-05-12T07:04:55+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/1PART2.png\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/1PART2.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Redis : The different Key Type Part2\"}]},{\"@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 : The different Key Type Part2 - 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-the-different-key-type-part2\/","og_locale":"en_US","og_type":"article","og_title":"Redis : The different Key Type Part2","og_description":"Introduction: Here is the second part of the Redis keys and features, we will see how to use, with a description from the official Redis site and some example for : So open your Redis-server and let&#8217;s check what is behind these different data types, and test some great features like: The different Data type [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/","og_site_name":"dbi Blog","article_published_time":"2023-05-12T07:04:53+00:00","article_modified_time":"2023-05-12T07:04:55+00:00","og_image":[{"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/1PART2.png","type":"","width":"","height":""}],"author":"Middleware Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Middleware Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/"},"author":{"name":"Middleware Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1"},"headline":"Redis : The different Key Type Part2","datePublished":"2023-05-12T07:04:53+00:00","dateModified":"2023-05-12T07:04:55+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/"},"wordCount":715,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/1PART2.png","articleSection":["NoSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/","url":"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/","name":"Redis : The different Key Type Part2 - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/1PART2.png","datePublished":"2023-05-12T07:04:53+00:00","dateModified":"2023-05-12T07:04:55+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/1PART2.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/05\/1PART2.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/redis-the-different-key-type-part2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Redis : The different Key Type Part2"}]},{"@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\/25171","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=25171"}],"version-history":[{"count":26,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/25171\/revisions"}],"predecessor-version":[{"id":25240,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/25171\/revisions\/25240"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=25171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=25171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=25171"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=25171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}