You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2020/02/24 22:08:51 UTC

[lucene-site] branch master updated: Cache static resources (with hash as query string only) for longer time, so site loads fast

This is an automated email from the ASF dual-hosted git repository.

uschindler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-site.git


The following commit(s) were added to refs/heads/master by this push:
     new e7ed4bf  Cache static resources (with hash as query string only) for longer time, so site loads fast
e7ed4bf is described below

commit e7ed4bf731961e330f12640cd6143f293f22a296
Author: Uwe Schindler <us...@apache.org>
AuthorDate: Mon Feb 24 23:08:35 2020 +0100

    Cache static resources (with hash as query string only) for longer time, so site loads fast
---
 themes/lucene/static/.htaccess | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/themes/lucene/static/.htaccess b/themes/lucene/static/.htaccess
new file mode 100644
index 0000000..4f8e939
--- /dev/null
+++ b/themes/lucene/static/.htaccess
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Theme's assets can be cached for 10 days, but only if we use a has as query string; otherwise no header is sent:
+Header add Cache-Control "public, max-age=864000, stale-while-revalidate=1728000" env=QUERY_STRING