コード例 #1
0
        public static string GetHotkeyword(int id)
        {
            HotkeywordInfo hotkeywordInfo = new HotkeywordDao().Get <HotkeywordInfo>(id);

            if (hotkeywordInfo != null)
            {
                return(hotkeywordInfo.Keywords);
            }
            return("");
        }
コード例 #2
0
        public static IList <HotkeywordInfo> GetAllHotKeywords()
        {
            IList <HotkeywordInfo> list = HiCache.Get <IList <HotkeywordInfo> >("DataCache-Keywords");

            if (list == null)
            {
                list = new HotkeywordDao().Gets <HotkeywordInfo>("Frequency", SortAction.Desc, null);
                HiCache.Insert("DataCache-Keywords", list, 600);
            }
            return(list);
        }