[interchange] Add optional cache exprire variable as pointed out here: http://www.icdevgroup.org/pipermail/interch
Peter Ajamian <[email protected]>
| Newsgroups | gmane.comp.web.interchange.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit fc5752e2e5a962a71ed117e0450a036ee5f141eb Author: Steve Graham <[email protected]> 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 <[email protected]> Author: Steve Graham <[email protected]> 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; }