> For the complete documentation index, see [llms.txt](https://gchandra.gitbook.io/big-data-and-tools-with-nosql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gchandra.gitbook.io/big-data-and-tools-with-nosql/nosql/redis/redis-cache-demo.md).

# Redis Cache Demo

```
git clone https://github.com/gchandra10/flask_redis_mysql_demo.git
```

**Rename config.yaml.template file to config.yaml**

```
mysql:
  host: localhost
  user: yourusername
  password: yourpassword
  port: mysqlport

redis:
  host: redis_host_name
  db: 0
  user: default
  password: redis_password
  port: redis_port
```

Remember, by default, **redis starts with db:0 and user: default.**

Unless you specifically create a new one.<br>

```
python3 app.py
```

Navigate to&#x20;

<http://127.0.0.1:8000><br>

Now call <http://127.0.0.1:8000/film/1>

The request will be made from MySQL

Refreshing it again, it will be from Redis.

Check the Time taken to load the data.<br>
