CClash.DirectCompilerCache.OnCacheMissLocked C# (CSharp) Method

OnCacheMissLocked() protected method

protected OnCacheMissLocked ( ICompiler comp, DataHash hc, IEnumerable args, CacheManifest m ) : int
comp ICompiler
hc DataHash
args IEnumerable
m CacheManifest
return int
        protected override int OnCacheMissLocked(ICompiler comp, DataHash hc, IEnumerable<string> args, CacheManifest m)
        {
            Logging.Emit("cache miss");
            outputCache.EnsureKey(hc.Hash);
            var stderrfile = outputCache.MakePath(hc.Hash, F_Stderr);
            var stdoutfile = outputCache.MakePath(hc.Hash, F_Stdout);
            var ifiles = new List<string>();
            Stats.LockStatsCall(() => Stats.CacheMisses++);

            int rv = Compile(comp, args, stderrfile, stdoutfile, ifiles );

            // we still hold the cache lock, create the manifest asap or give up now!

            if (rv != 0)
            {
                Unlock(CacheLockType.Read);
            }
            else
            {
                // this unlocks for us
                try
                {
                    DoCacheMiss(comp, hc, args, m, ifiles);
                }
                catch (CClashWarningException)
                {
                    return CompileOnly(comp, args);
                }
            }

            return rv;
        }