From 72cfe723e117a2d12b51148945d697fdc82173b1 Mon Sep 17 00:00:00 2001 From: botanic Date: Fri, 5 Sep 2014 02:17:19 -0700 Subject: [PATCH] fixed some caching --- code/web/private_php/ams/autoload/helpers.php | 5 +++-- code/web/public_php/ams/templates/show_ticket.tpl | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/code/web/private_php/ams/autoload/helpers.php b/code/web/private_php/ams/autoload/helpers.php index 6c6d2227e..6c80813c2 100644 --- a/code/web/private_php/ams/autoload/helpers.php +++ b/code/web/private_php/ams/autoload/helpers.php @@ -22,19 +22,20 @@ class Helpers { global $SITEBASE; global $AMS_TRANS; global $INGAME_LAYOUT; + global $AMS_CACHEDIR; // define('SMARTY_SPL_AUTOLOAD',1); require_once $AMS_LIB . '/smarty/libs/Smarty.class.php'; spl_autoload_register( '__autoload' ); $smarty = new Smarty; $smarty -> setCompileDir( $SITEBASE . '/templates_c/' ); - $smarty -> setCacheDir( $SITEBASE . '/cache/' ); + $smarty -> setCacheDir( $AMS_CACHEDIR ); $smarty -> setConfigDir( $SITEBASE . '/configs/' ); // turn smarty debugging on/off $smarty -> debugging = false; // caching must be disabled for multi-language support $smarty -> caching = false; - $smarty -> cache_lifetime = 5; + $smarty -> cache_lifetime = 300; if (function_exists('apc_cache_info')) { // production diff --git a/code/web/public_php/ams/templates/show_ticket.tpl b/code/web/public_php/ams/templates/show_ticket.tpl index deed7c0af..417b465c7 100644 --- a/code/web/public_php/ams/templates/show_ticket.tpl +++ b/code/web/public_php/ams/templates/show_ticket.tpl @@ -136,7 +136,7 @@ $(document).ready( function () { $('#file_upload').uploadify({ - 'formData' : {'PHPSESSID': '{/literal}{$sessionid}{literal}'}, + 'formData' : {'PHPSESSID': '{/literal}{nocache}{$sessionid}{/nocache}{literal}'}, 'auto' : true, 'multi' : true, 'method' : 'post',