Set Expires headers for Hydra's binary cache

[?]
Nov 6, 2014, 1:31 PM
AFNDUSGDI2LSRZICZNFXTCFNIVG6IZCKYR7V3KOTHXYUFUU6AYCAC

Dependencies

  • [2] PRDDAI6W Minor tweak
  • [3] 5OXBTB3L Don't fall thru to Hydra::View::NARInfo
  • [4] BEFHUCGN Factor a getResponsibleAuthors helper out of the HipChatNotification
  • [5] AJVEJENF Allow Hydra's binary cache to be signed
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] XE6HD7BP Provide the nix-cache-info file required by the binary cache substituter
  • [*] HAI5TY47 Make negative narinfo responses much smaller
  • [*] LBNVQXUB * Build the /build stuff in a separate controller.
  • [*] CS7T2XFI
  • [*] IDT3SO3P Generate *.narinfo files on the fly to support the binary cache substituter
  • [*] NYC3LZKH * Generate NAR archives on the fly. Necessary for producing channels

Change contents

  • edit in src/lib/Hydra/Controller/Root.pm at line 247
    [2.61]
    [8.259]
    setCacheHeaders($c, 365 * 24 * 60 * 60);
  • edit in src/lib/Hydra/Controller/Root.pm at line 264
    [9.298]
    [3.0]
    setCacheHeaders($c, 60 * 60);
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 31
    [4.26]
    [11.180]
    setCacheHeaders
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 309
    [4.1199]
    [10.3787]
    # Set HTTP headers for the Nix binary cache.
    sub setCacheHeaders {
    my ($c, $expiration) = @_;
    $c->response->headers->expires(time + $expiration);
    delete $c->response->cookies->{hydra_session};
    }
  • edit in src/lib/Hydra/View/NARInfo.pm at line 8
    [5.17]
    [12.778]
    use Hydra::Helper::CatalystUtils;
  • edit in src/lib/Hydra/View/NARInfo.pm at line 43
    [12.1661]
    [12.1661]
    setCacheHeaders($c, 24 * 60 * 60);
  • edit in src/lib/Hydra/View/NixNAR.pm at line 5
    [13.556]
    [13.556]
    use Hydra::Helper::CatalystUtils;
  • edit in src/lib/Hydra/View/NixNAR.pm at line 18
    [13.867]
    [13.867]
    setCacheHeaders($c, 365 * 24 * 60 * 60);