https://github.com/redis-developer/basic-caching-demo-nodejs
This is an example demo app that shows how Redis caching works using Nodejs
https://github.com/redis-developer/basic-caching-demo-nodejs
Last synced: 11 months ago
JSON representation
This is an example demo app that shows how Redis caching works using Nodejs
- Host: GitHub
- URL: https://github.com/redis-developer/basic-caching-demo-nodejs
- Owner: redis-developer
- License: mit
- Created: 2020-12-22T00:35:56.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-06-27T07:13:00.000Z (over 2 years ago)
- Last Synced: 2025-03-11T07:42:00.030Z (12 months ago)
- Language: Vue
- Size: 1.69 MB
- Stars: 19
- Watchers: 5
- Forks: 19
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Basic Redis Caching Demo
This app returns the number of repositories a Github account has. When you first search for an account, the server calls Github's API to return the response. This can take 100s of milliseconds. The server then adds the details of this slow response to Redis for future requests. When you search again, the next response comes directly from Redis cache instead of calling Github. The responses are usually returned in a millisecond or so making it blazing fast.
# Overview video
Here's a short video that explains the project and how it uses Redis:
[](https://youtube.com/watch?v=Ov18gLo0Da8)
## Try it out
#### Deploy to Heroku
#### Deploy to Vercel:
#### Deploy to Google Cloud
## How it works?

### 1. How the data is stored:
```
SETEX microsoft 3600 1000
```
### 2. How the data is accessed:
```
GET microsoft
```
## How to run it locally?
#### Copy `.env.sample` to create `.env`. And provide the values for environment variables
- REDIS_ENDPOINT_URI: Redis server URI
- REDIS_PASSWORD: Password to the server
#### Run frontend
```sh
cd client
yarn
yarn serve
```
#### Run backend
``` sh
yarn
yarn start
```