
Merge pull request #81 from rtshanks/fix-compilation-error …
Fix compilation error on OSX 10.9.2 running basic cmdline tools (closes #82)
Fix compilation error on OSX 10.9.2 running basic cmdline tools …
go version go1.2.1 darwin/amd64 Robs-MacBook-Air:~ rtshanks$ go get github.com/FiloSottile/Heartbleed src/go/src/github.com/FiloSottile/Heartbleed/bleed.go:59: syntax error: unexpected semicolon or newline before else src/go/src/github.com/FiloSottile/Heartbleed/bleed.go:63: syntax error: unexpected else, expecting semicolon or newline src/go/src/github.com/FiloSottile/Heartbleed/bleed.go:65: non-declaration statement outside function body src/go/src/github.com/FiloSottile/Heartbleed/bleed.go:66: non-declaration statement outside function body src/go/src/github.com/FiloSottile/Heartbleed/bleed.go:67: syntax error: unexpected }
Invalidate cache after "expiry", not every "expiry" …
This took me quite some time to figure out. It was implemented by the Mozilla guys, so I had no idea it worked this way. I was seeing Latency spikes every hour, and they seemed right, a lot of popular sites that need recaching, I was thinking. Then I discovered a bug, I was writing to the cache every time. Fixed. But wait, then why were there spikes at all? Eventually I noticed that they are not merely every hour, but at the beginning of every hour! Here is the gotcha: they were using Truncate, invalidating all the entries at the start of the period, so a entry from 11:59 will be invalid at 12:00. Changed.
Nesting check for `if err != nil`, only needs to be tested once.
Merge pull request #73 from d1str0/master …
Break into separate tests for verbosity.