remove cache test endpoint
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
from flask import Blueprint, redirect, url_for, render_template
|
from flask import Blueprint, redirect, url_for, render_template
|
||||||
from app import cache
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
bp = Blueprint("app", __name__, url_prefix = "/")
|
bp = Blueprint("app", __name__, url_prefix = "/")
|
||||||
@@ -7,12 +6,3 @@ bp = Blueprint("app", __name__, url_prefix = "/")
|
|||||||
@bp.route("/")
|
@bp.route("/")
|
||||||
def index():
|
def index():
|
||||||
return redirect(url_for("topics.all_topics"))
|
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