Skip to content

Commit

Permalink
feat(backend): cache reload bypass option on server startup
Browse files Browse the repository at this point in the history
  • Loading branch information
EliotAmn committed Jan 30, 2025
1 parent 843b9e8 commit bce02f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ their daily life.
| SCRAPERS_CONFIG_FILE | The path to the scrapers configuration file. Optional | scrapers.json |
| APP_URL | The app url used to send register links by email. | |
| ENABLE_MAILER | Enable the mailer service. | false |
| BYPASS_CACHE_RELOAD | This bypass the cache reload when the server is started. | false |

### Frontend (`/web/.env`)

Expand Down
3 changes: 2 additions & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ def serve(path):
return send_from_directory(flask_app.static_folder, 'index.html')

CORS(flask_app)
MouliService.refresh_all_cache()
if os.getenv("BYPASS_CACHE_RELOAD", "false") == "false":
MouliService.refresh_all_cache()

return flask_app

Expand Down

0 comments on commit bce02f0

Please sign in to comment.