protected virtual void SaveOutputsLocked(CacheManifest m, ICompiler c )
{
outputCache.AddFile(m.CommonHash, c.ObjectTarget, F_Object);
if (c.GeneratePdb)
{
var pdbhash = hasher.DigestBinaryFile(c.PdbFile);
m.PdbHash = pdbhash.Hash;
outputCache.AddFile(m.CommonHash, c.PdbFile, F_Pdb);
Stats.LockStatsCall(() => Stats.CacheSize += new FileInfo(c.PdbFile).Length);
}
Stats.LockStatsCall(() => Stats.CacheObjects++);
Stats.LockStatsCall(() => Stats.CacheSize += new FileInfo(c.ObjectTarget).Length);
// write manifest
var duration = c.Age;
m.Duration = (int)duration.TotalMilliseconds;
Logging.Emit("cache miss took {0}ms", (int)duration.TotalMilliseconds);
var fname = outputCache.MakePath(m.CommonHash, F_Manifest);
using (var fs = new FileStream(fname, FileMode.OpenOrCreate, FileAccess.Write))
{
m.Serialize(fs);
}
}