ktmud commented on a change in pull request #11509:
URL:
https://github.com/apache/incubator-superset/pull/11509#discussion_r523381058
##########
File path: superset/utils/cache.py
##########
@@ -14,20 +14,32 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-from typing import Any, Callable, Optional
+import logging
+from datetime import datetime, timedelta
+from functools import wraps
+from typing import Any, Callable, Optional, Union
-from flask import request
+from flask import current_app as app, request
+from flask_caching import Cache
+from werkzeug.wrappers.etag import ETagResponseMixin
from superset.extensions import cache_manager
+# If a user sets `max_age` to 0, for long the browser should cache the
+# resource? Flask-Caching will cache forever, but for the HTTP header we need
+# to specify a "far future" date.
+FAR_FUTURE = 365 * 24 * 60 * 60 # 1 year in seconds
Review comment:
I'm calling to call it `ONE_YEAR`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]