An artifact cache subsystem.

Review Request #2405 - Created June 23, 2015 and submitted

Benjy Weinberger
stuhood, zundel

This was no small endeavor, as the artifact cache code had
quite a few implicit tentacles out into the codebase.

This creates a CacheSetup subsystem, which in turn gives tasks
a CacheFactory, which is the thing that actually creates caches, based
on option values. The CacheFactory is necessary in order to encapsulate
non-option arguments such as the logger and the stable_name.

The resulting code is simpler and easier to grok (although the diffs
may not be). For example, tasks no longer need to explicitly set up
the cache; It gets set up as needed. Also, code that needs the read
cache accesses it directly, and ditto the write cache. The confusing
ReadWriteArtifactCache class is no longer needed, and has been deleted.

Also simplifies names of options and variables: 'artifact_cache'
is a mouthful, when there's only one kind of cache that 99% of users
care about - namely this one.

This is the first case we have of task-specific Subsystems, so there
are a few tweaks here and there to get that working properly.

This pecial-cases migration of the old cache-related options, which
required a little refactoring in

Lots of manual testing to verify that the cache ends up used as expected with the new config locations. Also checked that the use of the cache to optimize tool bootstrapping in tests still works.

CI went green here:

Stu Hood
Eric Ayers
Benjy Weinberger
Benjy Weinberger
Benjy Weinberger
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted as 4794f58b5e766ff67d1d8304f08a43d545c1a14a.