[interchange] Add optional cache exprire variable as pointed out here: http://www.icdevgroup.org/pipermail/interch

Peter Ajamian interchange-cvs at icdevgroup.org
Fri Sep 16 21:01:38 UTC 2011


commit fc5752e2e5a962a71ed117e0450a036ee5f141eb
Author: Steve Graham <icdev at mrlock.com>
Date:   Fri Sep 16 14:33:29 2011 -0500

    Add optional cache exprire variable as pointed out here: http://www.icdevgroup.org/pipermail/interchange-users/2003-June/033985.html
    
    Signed-off-by: Peter Ajamian <peter at pajamian.dhs.org>
    
    Author:    Steve Graham <icdev at mrlock.com>

 lib/Vend/Ship/QueryUPS.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lib/Vend/Ship/QueryUPS.pm b/lib/Vend/Ship/QueryUPS.pm
index 85e4cc8..4fe4eea 100644
--- a/lib/Vend/Ship/QueryUPS.pm
+++ b/lib/Vend/Ship/QueryUPS.pm
@@ -137,7 +137,7 @@ sub calculate {
 				$shipping = $ary->[0][1];
 				$updated = $ary->[0][2];
 				$now = time();
-				if($now - $updated > 86000) {
+				if($now - $updated > $Variable->{UPS_CACHE_EXPIRE} || 86000) {
 					undef $shipping;
 					$updated = $now;
 				}



More information about the interchange-cvs mailing list