add caching

Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/e07748b3
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/e07748b3
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/e07748b3

Branch: refs/heads/master
Commit: e07748b36b109cbbd4c6f4e6b60b02bc773196b9
Parents: b653c62
Author: Derek Gelinas <mrdgeli...@gmail.com>
Authored: Wed Mar 15 17:50:04 2017 +0000
Committer: Jeremy Mitchell <mitchell...@gmail.com>
Committed: Thu Mar 16 15:08:24 2017 -0600

----------------------------------------------------------------------
 traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e07748b3/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm 
b/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
index 2708275..055a9c7 100644
--- a/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
+++ b/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
@@ -76,7 +76,9 @@ sub get_config_metadata {
                $data_obj->{'info'}->{'cdn_name'}               = $cdn_name;
                $data_obj->{'info'}->{'cdn_id'}                 = 
$server->cdn->id;
                $data_obj->{'info'}->{'tm_url'}                 = $tm_url;
-               $data_obj->{'info'}->{'tm_cache_url'}   = $tm_cache_url;
+               if ( $tm_cache_url ) {
+                       $data_obj->{'info'}->{'tm_cache_url'}   = $tm_cache_url;
+               }
 
                #$data_obj->{'profile'}->{'name'}   = $server->profile->name;
                #$data_obj->{'profile'}->{'id'}     = $server->profile->id;

Reply via email to