Hit() public static method

public static Hit ( string hashkey, string dir, string obj ) : void
hashkey string
dir string
obj string
return void
コード例 #1
0
        public virtual int CompileOrCache(ICompiler comp, IEnumerable <string> args)
        {
            if (IsSupported(comp, args))
            {
                args = comp.CompileArgs;
                var hc = DeriveHashKey(comp, args);
                if (hc.Result == DataHashResult.Ok)
                {
                    CacheManifest hm;
                    if (CheckCache(comp, args, hc, out hm))
                    {
                        Logging.Hit(hc.Hash, comp.WorkingDirectory, comp.ObjectTarget);
                        return(OnCacheHitLocked(comp, hc, hm));
                    }
                    else
                    {   // miss, try build
                        return(OnCacheMissLocked(comp, hc, args, hm));
                    }
                }
            }
            else
            {
                Stats.LockStatsCall(() => Stats.CacheUnsupported++);
            }

            if (comp.ResponseFile != null)
            {
                if (File.Exists(comp.ResponseFile))
                {
                    //var resp = File.ReadAllText(comp.ResponseFile);
                }
            }

            return(CompileOnly(comp, args));
        }