{"id":21431649,"url":"https://github.com/tomdoestech/learn-redis","last_synced_at":"2025-09-05T16:36:59.371Z","repository":{"id":226740349,"uuid":"769529314","full_name":"TomDoesTech/learn-redis","owner":"TomDoesTech","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-09T10:43:56.000Z","size":14,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-17T06:07:24.099Z","etag":null,"topics":["nodejs","redis"],"latest_commit_sha":null,"homepage":"https://youtu.be/mofZIitXMvU","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TomDoesTech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-09T10:40:07.000Z","updated_at":"2024-03-21T08:25:08.000Z","dependencies_parsed_at":"2024-03-09T11:50:02.839Z","dependency_job_id":null,"html_url":"https://github.com/TomDoesTech/learn-redis","commit_stats":null,"previous_names":["tomdoestech/learn-redis"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomDoesTech%2Flearn-redis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomDoesTech%2Flearn-redis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomDoesTech%2Flearn-redis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomDoesTech%2Flearn-redis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomDoesTech","download_url":"https://codeload.github.com/TomDoesTech/learn-redis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225976215,"owners_count":17554197,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nodejs","redis"],"created_at":"2024-11-22T23:10:59.298Z","updated_at":"2024-11-22T23:10:59.802Z","avatar_url":"https://github.com/TomDoesTech.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Learn Just Enough Redis to be Productive\n\n\u003cimg src=\"redis-logo.svg\" width=\"45%\" style=\"float:left;\" /\u003e\n\u003cimg src=\"upstash.svg\" width=\"45%\" /\u003e\n\n\n## Useful links\n- [Build \u0026 Deploy a Realtime App that Scales with Upstash Redis, Next.js \u0026 Fastify](https://youtu.be/cfEqS1A5diM)\n- [Upstash Redis](https://upstash.com/?utm_source=tom1)\n\n\n## What you will learn\n- What Redis is\n- Why Redis is so popular\n- How to use Redis\n- How to use Redis to solve some common problems in Node.js\n\n**What you will need**\n- Node.js\n- Upstash Redis account (free) https://upstash.com/\n\n\n**What is Redis?**\n- Key value store\n- Can handle lots of different data structures: https://redis.io/docs/data-types/\n- Has lots of features that you’d expect from a database:\n    - Pub/Sub https://redis.io/docs/interact/pubsub/\n    - Transactions https://redis.io/docs/interact/transactions/\n    - Persistence https://redis.io/docs/management/persistence/\n    - Programmability with Lua https://redis.io/docs/interact/programmability/\n\n\n## Video sturcture\n1. Getting started with Upstash Redis\n2. Basic commands \u0026 data structures\n3. Problems Redis can solve\n    - Caching\n    - Rate limiting\n    - Pub/Sub\n    - Indexes\n    - Transactions\n\n## Basic commands\nhttps://redis.io/commands/\n\n- Set `set mykey tom`\n- Get `get mykey`\n- Del `DEL mykey`\n- Set with TTL `SETEX key seconds value`\n- Check if key exists `EXISTS mykey`\n- List keys `KEYS *`\n\n### Data structures\n**JSON**\n```\nSET user:100 '{\"name\": \"John\", \"age\": 30, \"email\": \"john@example.com\"}'\nGET user:100\n```\n\n**Hash**\nHashes are used to store objects, represented by fields and values.\n```\nHSET user:101 name \"Alice\"\nHSET user:101 age 24\nHSET user:101 email \"alice@example.com\"\n\nHGET user:101 name\n```\n\n**Sets**\nSets are collections of unique elements\n```\nSADD myset 1 2 3\n\nSMEMBERS myset\n```\n```\nSADD users tom\nSADD users alice\nSADD users tom\n\nSMEMBERS users\n```\n\n**Sorted Sets**\nSorted sets are similar to sets, but every member of a sorted set is associated with a score, that is used in order to take the sorted set ordered, from the smallest to the greatest score.\n```\nZADD myzset 1 \"one\"\nZADD myzset 2 \"two\"\nZADD myzset 3 \"three\"\n\nZRANGE myzset 0 -1\n```\n\n**Counters**\n```\nINCR counter\nINCRBY counter 10\nDECR counter\nDECRBY counter 5\n\nGET counter\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomdoestech%2Flearn-redis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomdoestech%2Flearn-redis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomdoestech%2Flearn-redis/lists"}