コード例 #1
0
        public static void RemoveCache(this ICacheRow cacheLogic, string key)
        {
            if (string.IsNullOrEmpty(key))
            {
                return;
            }

            string cacheKey = cacheLogic.GetType().Name + "_" + key;

            removeCacheRaw(cacheKey);
        }
コード例 #2
0
        // CacheRow
        public static dynamic Cache(this ICacheRow cacheLogic, string key)
        {
            if (string.IsNullOrEmpty(key))
            {
                return(null);
            }

            string cacheKey = cacheLogic.GetType().Name + "_" + key;

            return(cacheRaw(cacheKey, () => {
                return cacheLogic.GetRow(key);
            }));
        }