I am new to using Flask. I have written basic Flask code for Hello World but after updating function I am still seeing old value on the web page. From what I read on other posts and blogs, this might be Cache problem. But I am not sure how to clear it.
Old Function:
def hello_world():
print('Hello World')
New Function:
def hello_world():
print('Hello Hi')
I am still seeing Hello World
as an output in the web page instead of Hello Hi
.
I am running code in PyCharm 2018.2.5 if this helps
from flask import Flask
from flask_caching import Cache
app = Flask(__name__)
cache = Cache'(config={'CACHE_TYPE': 'simple'})
@app.route('/')
def hello_world():
print('Hello Hi')
if __name__ == '__main__':
cache.init_app(app)
with app.app_context():
cache.clear()
app.run(debug=True)
Thank you in advance.