public static bool IsVersionCached(string url, int version)
    {
        CustomCaching.CacheItem cacheItem;
        string text;

        return(CustomCaching._IsVersionCached(url, version, out cacheItem, out text));
    }
    public static WWW LoadFromCacheOrDownload(string url, int version, long fileSize, WWWItem wItem)
    {
        CustomCaching.CacheItem cacheItem;
        string arg;
        bool   flag = CustomCaching._IsVersionCached(url, version, out cacheItem, out arg);
        WWW    wWW;

        if (flag)
        {
            if (cacheItem.wref != null && cacheItem.wref.Target != null)
            {
                TsLog.Assert(cacheItem.wref.IsAlive, "CustomCaching: Duplicated request! but WWW reference is removed! (url=\"{0}\")", new object[]
                {
                    cacheItem.url
                });
                wWW = cacheItem.wref.CastedTarget;
            }
            else
            {
                string url2 = string.Format("file://{0}", arg);
                wWW = new WWW(url2);
            }
        }
        else
        {
            wWW = new WWW(url);
            if (cacheItem == null)
            {
                if (CustomCaching._cacheList.TryGetValue(wItem.assetPath, out cacheItem))
                {
                    TsLog.LogWarning("CustomCaching. Duplicated cache list item (path=\"{0}\")", new object[]
                    {
                        wItem.assetPath
                    });
                }
                cacheItem     = new CustomCaching.CacheItem();
                cacheItem.url = wItem.assetPath;
            }
            cacheItem.wref    = wWW;
            cacheItem.version = version;
            cacheItem.size    = fileSize;
            wItem.SetCallback(new PostProcPerItem(CustomCaching.CallbackSaveAssetBundle), cacheItem);
        }
        return(wWW);
    }