What is the advantage of using the Flask Redis extension in this example...
from flask import Flask, render_template
from flask.ext.redis import Redis
app = Flask(__app__)
app.config['REDIS_HOST'] = 'localhost'
app.config['REDIS_PORT'] = 6379
app.config['REDIS_DB'] = 0
r = Redis(app)
@app.route("/")
def index():
return render_template("index.html", **r.hgetall("temp.index"))
...over a regular Redis connection instance?
from flask import Flask, render_template
import redis
r = redis.Redis()
@app.route("/")
def index():
return render_template("index.html", **r.hgetall("temp.index"))