   defp to_style(nil), do: "default"
   defp to_style(style) when style in @valid_styles, do: style
   defp to_style(_), do: to_style(nil)
+
+  defp set_resp_headers(conn, build) do
+    header = conn.resp_headers |> List.keyfind("cache-control", 0)
+    resp_headers =
+      conn.resp_headers
+      |> List.delete(header)
+
+    if build do
+      expires = build.updated_at |> to_string
+      resp_headers =
+        [{"Expires", expires}]
+        ++ resp_headers
+    end
+
+    resp_headers =
+      [{"Cache-Control", "no-cache"}, {"Pragma", "no-cache"}]
+      ++ resp_headers
+
+    %Plug.Conn{conn | resp_headers: resp_headers}
+  end
 end

      bar_width: @bar_width,
      percentages_and_grades: percentages_and_grades
    ]
    render_badge_to_string(:all_deps, to_style(style), assigns)
  end

  #

      bar_width: @bar_width,
      percentages_and_grades: percentages_and_grades
    ]
    badge_source = render_badge_to_string(:prod_deps, to_style(style), assigns)

    {badge_source, build}
  end

  #
