cache.go broken out of imgdedup.go