noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 04/05: Add the ENABLE_CACHE option


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 04/05: Add the ENABLE_CACHE option
Date: Sat, 29 Aug 2015 08:56:36 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit e23d1649fec8a2542b9a6a2bfd6a004fe7007644
Author: Dany De Bontridder <address@hidden>
Date:   Sat Aug 29 10:41:10 2015 +0200

    Add the ENABLE_CACHE option
---
 include/ac_common.php   |    3 +++
 include/config_file.php |    2 ++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/ac_common.php b/include/ac_common.php
index 2151a2e..e14b504 100644
--- a/include/ac_common.php
+++ b/include/ac_common.php
@@ -320,6 +320,9 @@ function html_page_start($p_theme="", $p_script="", 
$p_script2="")
     <link rel=\"stylesheet\" type=\"text/css\" 
href=\"./style-print.css?version=".SVNINFO."\" media=\"print\"/>" .
     $p_script2 . "
     ";
+    if (ENABLE_CACHE == 'YES') {
+        echo '<meta http-equiv="Cache-control" 
content="private,max-age:3600">';
+    }
     echo '<script language="javascript" src="js/calendar.js"></script>
     <script type="text/javascript" src="js/lang/calendar-en.js"></script>
     <script language="javascript" src="js/calendar-setup.js"></script>
diff --git a/include/config_file.php b/include/config_file.php
index 11a82f7..6cea8e0 100644
--- a/include/config_file.php
+++ b/include/config_file.php
@@ -187,6 +187,8 @@ function config_file_create($p_array,$from_setup=1,$p_os=1)
     fputs($hFile, "// published"."\r\n");
     fputs($hFile, '// define ("SITE_UPDATE","");'."\r\n");
     fputs($hFile, '// define ("SITE_UPDATE_PLUGIN","");'."\r\n");
+    fputs($hFile, '// Uncomment to disable cache header'."\r\n");
+    fputs($hFile, '// define ("ENABLE_CACHE","NO");'."\r\n");
     fputs($hFile,'?>');
     fclose($hFile);
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]