gopkg icon indicating copy to clipboard operation
gopkg copied to clipboard

cache godoc package data

Open vmpjdc opened this issue 5 years ago • 1 comments

Now that gopkg.in is hosted in the UK, godoc requests made while rendering the human-readable package pages take a lot longer (often a second or more). This branch adds a cache with a TTL of 1 hour.

Also, mainly as an exercise, I've removed dataMutex and replaced gotResp with a pair of string channels.

vmpjdc avatar Oct 23 '19 02:10 vmpjdc

Sorry, I'm crazy. I mixed up the work I've done on the documentation proxy, which does have a nice cache, with this. Thanks for adding the cache. I'll send a review next.

niemeyer avatar Oct 23 '19 08:10 niemeyer