https://github.com/dking1342/redis-intro
An intro into redis with some examples and commands
https://github.com/dking1342/redis-intro
redis redis-cache redis-client redis-database redis-server
Last synced: about 1 month ago
JSON representation
An intro into redis with some examples and commands
- Host: GitHub
- URL: https://github.com/dking1342/redis-intro
- Owner: dking1342
- Created: 2022-05-20T02:59:43.000Z (about 4 years ago)
- Default Branch: redis-1
- Last Pushed: 2022-05-21T06:52:23.000Z (about 4 years ago)
- Last Synced: 2025-06-15T23:11:22.013Z (12 months ago)
- Topics: redis, redis-cache, redis-client, redis-database, redis-server
- Language: JavaScript
- Homepage:
- Size: 53.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Redis
## Documentation
Documentation for Redis can be found here
## Examples
Examples of a practical usage of Redis can be found in this repo.
## Commands
The commands you can use with Redis can be found here
### Simple Commands
Data is stored in a key, value pair. The crud type of commands are:
SET key value - creating a record
GET key - retrieves a key, value pair
DEL key - deletes a key, value pair
EXISTS key - determine if key, value pair is there
KEYS pattern - retrieves all key, value pairs in storage matching the pattern
KEYS * - retrieves all key, value pairs in storage
FLUSHALL - clears the entire storage
TTL key - time to live for the key, value pair
EXPIRE key time - makes a key, value pair expire in t time
SETEX key time value - sets a key, value pair and have it expire in t time
### Different data types
#### Array
LRANGE key start stop - retrives an array
LPUSH key value - pushes the value to an array
RPUSH key value - add the value to the end of the array
LPOP key - pops the first value of the array and returns it
RPOP key - pops the last value of the array and returns it
#### Sets
SADD key member - adds a value to the set
SMEMBERS key - retrieves all the values of the set
SREM key - removes the set
#### Hash - no nesting
HSET key field value - inserts a key, value pair into the heap
HGET key field - retrieves a unique key, value pair from the heap
HGETALL key - retrieves all key, value pairs from the heap
HDEL key field - removes a key, value pair from the heap
HEXISTS key field - checks to see if key, value pair exists in the heap