Enable Apache caching (30min)
authorBenoit Dien <benoit.dien@gmail.com>
Sat, 6 Aug 2011 23:20:52 +0000 (01:20 +0200)
committerGuillaume Cottenceau <gcottenc@gmail.com>
Mon, 12 Mar 2012 16:37:26 +0000 (17:37 +0100)
bin/booh-backend

index 1dbc88c..bd575b9 100755 (executable)
@@ -943,6 +943,12 @@ def walk_source_dir
         if !$forgui
             ios = File.open("#{dest_dir}/.htaccess", "w")
             ios.write("AddCharset UTF-8 .html\n")
+            ios.write("\n")
+            ios.write("<IfModule mod_expires.c>\n")
+            ios.write(" ExpiresActive On\n")
+            ios.write(" ExpiresDefault A1800\n")
+            ios.write("</IfModule>")
+            ios.write("\n")
             if auth_user_file = xmldir.attributes['password-protect']
                 msg 3, _("\tgenerating password protection file #{dest_dir}/.htaccess")
                 ios.write("AuthType Basic\nAuthName \"protected area\"\nAuthUserFile #{auth_user_file}\nrequire valid-user\n")