BVB Source Codes

Jie Yang v0.6.3 article system Show clsCache.asp Source code

Return Download Jie Yang v0.6.3 article system: download clsCache.asp Source code - Download Jie Yang v0.6.3 article system Source code - Type:.asp
  1. <%
  2. class clsCache
  3. '----------------------------
  4. private cache           '缓存内容
  5. private cacheName       '缓存Application名称
  6. private expireTime      '缓存过期时间
  7. private expireTimeName  '缓存过期时间Application名称
  8. private path            '缓存页URL路径
  9. private vaild           'ansir添加
  10. private sub class_initialize()
  11. path=request.servervariables("url")
  12. path=left(path,instrRev(path,"/"))
  13. end sub
  14.        
  15. private sub class_terminate()
  16. end sub
  17.  
  18. Public Property Get Version
  19.         Version="先锋缓存类 Version 2004"
  20. End Property
  21.  
  22. public property get valid '读取缓存是否有效/属性
  23. if isempty(cache) or (not isdate(expireTime)) then
  24. vaild=false
  25. else
  26. valid=true
  27. end if
  28. end property
  29.  
  30. public property get value '读取当前缓存内容/属性
  31. if isempty(cache) or (not isDate(expireTime)) then
  32. value=null
  33. elseif CDate(expireTime)<now then
  34. value=null
  35. else
  36. value=cache
  37. end if
  38. end property
  39.  
  40. public property let name(str) '设置缓存名称/属性
  41. cacheName=str&path
  42. cache=application(cacheName)
  43. expireTimeName=str&"expire"&path
  44. expireTime=application(expireTimeName)
  45. end property
  46.  
  47. public property let expire(tm) '设置缓存过期时间/属性
  48. expireTime=tm
  49. application.Lock()
  50. application(expireTimeName)=expireTime
  51. application.UnLock()
  52. end property
  53.  
  54. public sub add(varCache,varExpireTime) '对缓存赋值/方法
  55. if isempty(varCache) or not isDate(varExpireTime) then
  56. exit sub
  57. end if
  58. cache=varCache
  59. expireTime=varExpireTime
  60. application.lock
  61. application(cacheName)=cache
  62. application(expireTimeName)=expireTime
  63. application.unlock
  64. end sub
  65.  
  66. public sub clean() '释放缓存/方法
  67. application.lock
  68. application(cacheName)=empty
  69. application(expireTimeName)=empty
  70. application.unlock
  71. cache=empty
  72. expireTime=empty
  73. end sub
  74.  
  75. public function verify(varcache2) '比较缓存值是否相同/方法——返回是或否
  76. if typename(cache)<>typename(varcache2) then
  77.         verify=false
  78. elseif typename(cache)="Object" then
  79.         if cache is varcache2 then
  80.                 verify=true
  81.         else
  82.                 verify=false
  83.         end if
  84. elseif typename(cache)="Variant()" then
  85.         if join(cache,"^")=join(varcache2,"^") then
  86.                 verify=true
  87.         else
  88.                 verify=false
  89.         end if
  90. else
  91.         if cache=varcache2 then
  92.                 verify=true
  93.         else
  94.                 verify=false
  95.         end if
  96. end if
  97. end function
  98. end class
  99. %>
downloadclsCache.asp Source code - Download Jie Yang v0.6.3 article system Source code
Related Source Codes/Software:
Jilin classification information release system v5.0 trial version - A ready-made classifieds site publishing system, h... 2016-09-21
Linyi CMS v6.5 market classification information - A. supply and demand information function: informa... 2016-09-21
Tesco discount net SQL version - And presentations, faster. 2016-09-21
- electronic enterprise website management system In a fully functional version - Super suitable for enterprise agents build a corpo... 2016-09-21
Rio mesh network hard disk system v3.0 - System functions: 1, increase the progress of Asp... 2016-09-21
Classified information network business in suzhou - Overall module: classification of supply and deman... 2016-09-21
NPOINT virtual host v1.7.0 formal version management system - The system main function is introduced 2016-09-21
IDC sales web site - Beautiful IDC sales web site source code 2016-09-21
Oo 126 CMS movie site system - This procedure ASP + ACC/ASP + SQL, using new kern... 2016-09-21
Pcook CMS bubble guest v3.0 SDCMS version - Developed by Asp+Access, and meet the needs of sma... 2016-09-21
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top