From c8c419519dea20040093ff2fdb87cd6f3650f127 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Sep 10 2024 13:47:35 +0000 Subject: Remove cache_timeout as that's deprecated This was replaced by max_age in Flask 0.9, and default to the value of get_send_file_max_age per documentation. Fix #223 --- diff --git a/fedocal/flask_multistatic.py b/fedocal/flask_multistatic.py index 91254c0..89bd0e7 100644 --- a/fedocal/flask_multistatic.py +++ b/fedocal/flask_multistatic.py @@ -80,10 +80,6 @@ class MultiStaticFlask(Flask): if not self.has_static_folder: raise RuntimeError('No static folder for this object') - # Ensure get_send_file_max_age is called in all cases. - # Here, we ensure get_send_file_max_age is called for Blueprints. - cache_timeout = self.get_send_file_max_age(filename) - folders = self.static_folder if isinstance(self.static_folder, string_types): folders = [self.static_folder] @@ -91,7 +87,7 @@ class MultiStaticFlask(Flask): for directory in folders: try: return send_from_directory( - directory, filename, cache_timeout=cache_timeout) + directory, filename) except NotFound: pass raise NotFound()