Skip to content

Commit

Permalink
Add cachelib
Browse files Browse the repository at this point in the history
  • Loading branch information
sondregronas committed Jul 8, 2024
1 parent aa9cbbf commit d16c687
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions BookingSystem/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from datetime import datetime
from urllib.parse import urlparse

import cachelib
import flask
from dateutil import parser
from flask_compress import Compress
Expand All @@ -27,6 +28,7 @@ def create_app() -> flask.Flask:

app.secret_key = os.getenv('SECRET_KEY')
app.config['SESSION_TYPE'] = 'cachelib'
app.config['SESSION_CACHELIB'] = cachelib.FileSystemCache(cache_dir='./flask_session', threshold=500)
if os.getenv('DEBUG') == 'True':
app.debug = True

Expand Down

0 comments on commit d16c687

Please sign in to comment.