RT# 39340 - fixed skin_info caching issue
authorChristopher Burger <burgerc@freeside.biz>
Mon, 17 Sep 2018 18:32:33 +0000 (14:32 -0400)
committerChristopher Burger <burgerc@freeside.biz>
Mon, 17 Sep 2018 18:32:33 +0000 (14:32 -0400)
FS/FS/ClientAPI/MyAccount.pm

index ab11415..6cb0a7c 100644 (file)
@@ -107,7 +107,7 @@ sub skin_info {
   $p->{'agentnum'} = $agentnum;
 
   my $conf = new FS::Conf;
-
+  my $timeout = $conf->config('selfservice-session_timeout') || '1 hour';
   #false laziness w/Signup.pm
 
   my $skin_info_cache_agent = _cache->get("skin_info_cache_agent$agentnum");
@@ -150,7 +150,7 @@ sub skin_info {
       'menu'  => _menu($domain,$menu),
     };
 
-    _cache->set("skin_info_cache_agent$agentnum", $skin_info_cache_agent);
+    _cache->set("skin_info_cache_agent$agentnum", $skin_info_cache_agent, $timeout);
 
   }