Implement build cache based on history array
Implement build cache based on history array

Based on work by KJ Tsanaktsidis

Signed-off-by: Tonis Tiigi <c2470c48b2d3312d61f94f18d3a1cd113d1915ad@gmail.com>
Signed-off-by: KJ Tsanaktsidis <5e44cf7f977b190c5da4d49b422e2de0754ca7b8@gmail.com>

docker/cli,thaJeztah/cli,cpuguy83/cli,dnephin/cli,allencloud/cli,redpanda/cli,thaJeztah/cli,riyazdf/cli,redpanda/cli,gdevillele/cli,ashfall/cli,allencloud/cli,docker/cli,riyazdf/cli,dnephin/cli,Zebrilee/cli,ashfall/cli,e11137/cli,cpuguy83/cli,e11137/cli,Zebrilee/cli