draw the rest of the owl
This commit is contained in:
@@ -1,7 +1,18 @@
|
||||
from flask import Blueprint, redirect, url_for, render_template
|
||||
from app import cache
|
||||
from datetime import datetime
|
||||
|
||||
bp = Blueprint("app", __name__, url_prefix = "/")
|
||||
|
||||
@bp.route("/")
|
||||
def index():
|
||||
return redirect(url_for("topics.all_topics"))
|
||||
|
||||
@bp.route("/cache-test")
|
||||
def cache_test():
|
||||
test_value = cache.get('test')
|
||||
if test_value is None:
|
||||
test_value = 'cached_value_' + str(datetime.now())
|
||||
cache.set('test', test_value, timeout=10)
|
||||
return f"set cache: {test_value}"
|
||||
return f"cached: {test_value}"
|
||||
|
||||
Reference in New Issue
Block a user