From f2ac0f5eae708e533e80f32bfb15cb7e6d651d68 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Mon, 25 Sep 2017 16:59:39 +1000 Subject: [PATCH] feat(heartbeat resource): cache json response body --- lib/pact_broker/diagnostic/resources/heartbeat.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/pact_broker/diagnostic/resources/heartbeat.rb b/lib/pact_broker/diagnostic/resources/heartbeat.rb index 3d334e650..977bbd3bd 100644 --- a/lib/pact_broker/diagnostic/resources/heartbeat.rb +++ b/lib/pact_broker/diagnostic/resources/heartbeat.rb @@ -14,7 +14,7 @@ def content_types_provided end def to_json - { + @@json ||= { "ok" => true, "_links" => { "self" => { @@ -23,7 +23,6 @@ def to_json } }.to_json end - end end end