You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/01/11 01:25:56 UTC

[GitHub] [superset] ktmud commented on a change in pull request #11509: feat: rename TABLE_NAMES_CACHE_CONFIG to DATA_CACHE_CONFIG

ktmud commented on a change in pull request #11509:
URL: https://github.com/apache/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 going 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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org