濮阳杆衣贸易有限公司

主頁 > 知識庫 > asp自帶的內(nèi)存緩存 application

asp自帶的內(nèi)存緩存 application

熱門標簽:智能電銷機器人適用于哪些行業(yè) 地圖標注服務哪家好 西寧公司外呼系統(tǒng)平臺 地圖標注宅基地 武漢營銷電話機器人軟件 徐州人工智能電銷機器人好用嗎 長沙防封電銷卡品牌 外呼系統(tǒng)還用卡么 騰訊地圖標注商戶關閉
函數(shù)getcache,會自動建立需要的緩存。
復制代碼 代碼如下:

Function getcache(funsname,isreset,isarr,timeinfo)
‘funsname — 需要緩存的內(nèi)容,這里要輸入一個function名
‘isreset –是否更新[值:0(根據(jù)時間或判斷緩存為空時自動更新)、1(主動更新)]
‘ isarr —- 所緩存的內(nèi)容是否為一個數(shù)據(jù)[0為字符串,1為數(shù)組]
‘ timeinfo —- 緩存更新時間,單位為秒,當值為0時,則只在緩存為空時,才更新
dim domain = “cnzhaopin.com.cn”
Dim temp_getconfig
Dim re_getcache : re_getcache = False
Dim temp_isarray_type : temp_isarray_type = False
Dim Appfunsname : Appfunsname = Replace(Replace(Replace(funsname,”(”,”"),”)”,”"),”,”,”.”)
If isarr = 1 Then temp_isarray_type = True
If isreset = 1 Then re_getcache = True
If isreset = 2 Then
execute(”temp_getconfig=”funsname)
getcache = temp_getconfig
Exit Function
End If
If Application(domain”_”Appfunsname”_time”) = “” And timeinfo>0 Then re_getcache = True
If Not re_getcache Then
If temp_isarray_type Then
If Not IsArray(Application(domain”_”Appfunsname)) Then re_getcache = True
Else
If Application(domain”_”Appfunsname) = “” Then re_getcache = True
End If
End If
If Not re_getcache And timeinfo>0 Then
If Int(DateDiff(”s”,Application(domain”_”Appfunsname”_time”),now()))>timeinfo Then re_getcache = True
End If
If re_getcache Then
execute(”temp_getconfig=”funsname)
Application.Lock
Application(domain”_”Appfunsname) = temp_getconfig
Application(domain”_”Appfunsname”_time”) = Now()
Application.UnLock
Else
temp_getconfig=Application(domain”_”Appfunsname)
End If
getcache = temp_getconfig
End Function


使用時:

復制代碼 代碼如下:

Function output3
output3=”"
set newrs=conn.execute(”select TOP 60 companyname,comid,vipdata,ishot from company where isok=1 and vipqx>60 and vipqx300 and vip=1 and comid in (select comid from jobs where zt>1) order by newid()”)
do while not newrs.eof
output3=output3 “……….”
newrs.movenext
loop
newrs.close
set newrs=nothing
End function
response.write getcache(”output3″,0,0,3600)
您可能感興趣的文章:
  • ASP編程入門進階(九):內(nèi)置對象Application
  • javascript asp教程第十一課--Application 對象
  • asp清空application的方法
  • ASP javascript Application對象的Contents和StaticObjects做Cache的一些經(jīng)驗
  • ASP.NET內(nèi)置對象之Application對象
  • asp.net Reporting Service在Web Application中的應用
  • php和asp利用Shell.Application來執(zhí)行程序的代碼
  • ASP.NET中Application和Cache的區(qū)別分析
  • asp.net錯誤處理Application_Error事件示例
  • ASP.NET 使用application與session對象寫的簡單聊天室程序
  • ASP基礎入門第八篇(ASP內(nèi)建對象Application和Session)

標簽:運城 普洱 巴彥淖爾 通化 通遼 荊門 雅安 鷹潭

巨人網(wǎng)絡通訊聲明:本文標題《asp自帶的內(nèi)存緩存 application》,本文關鍵詞  asp,自帶,的,內(nèi)存,緩存,application,;如發(fā)現(xiàn)本文內(nèi)容存在版權問題,煩請?zhí)峁┫嚓P信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《asp自帶的內(nèi)存緩存 application》相關的同類信息!
  • 本頁收集關于asp自帶的內(nèi)存緩存 application的相關信息資訊供網(wǎng)民參考!
  • 推薦文章
    华池县| 大冶市| 平度市| 汉中市| 古浪县| 于田县| 宁强县| 天柱县| 诸城市| 南宫市| 南丹县| 汨罗市| 杭锦后旗| 诸暨市| 镇坪县| 公主岭市| 施秉县| 朝阳区| 兴国县| 报价| 胶州市| 永顺县| 澄迈县| 富民县| 昆明市| 凤庆县| 博乐市| 克什克腾旗| 龙州县| 方正县| 榆中县| 牟定县| 双桥区| 饶平县| 明溪县| 密山市| 湖南省| 涿州市| 新乡县| 曲靖市| 麻阳|