コード例 #1
0
ファイル: ObjectCachePool.cs プロジェクト: wuhuolong/MaxBooks
        public object try_hit_cache(object _key)
        {
            if (_key == null)
            {
                return(null);
            }
            CachedObjectInfo cache_info = get_cache_info(_key);

            if (cache_info == null)
            {
                return(null);
            }
            object obj = cache_info.try_hit_cache();

            if (obj != null)
            {
                cache_info.update_weight(Time.time);
            }
            return(obj);
        }