捌度空間 緩存類
捌度空間 緩存類代碼
<%
class cache
private obj 'cache內容
private expiretime '過期時間
private expiretimename '過期時間application名
private cachename 'cache內容application名
private path 'url
private sub class_initialize()
path=request.servervariables("url")
path=left(path,instrrev(path,"/"))
end sub
private sub class_terminate()
end sub
public property get blempty
'是否為空
if isempty(obj) then
blempty=true
else
blempty=false
end if
end property
public property get valid
'是否可用(過期)
if isempty(obj) or not isdate(expiretime) then
valid=false
elseif cdate(expiretime)
代碼如下:
<%
class cache
private obj 'cache內容
private expiretime '過期時間
private expiretimename '過期時間application名
private cachename 'cache內容application名
private path 'url
private sub class_initialize()
path=request.servervariables("url")
path=left(path,instrrev(path,"/"))
end sub
private sub class_terminate()
end sub
public property get blempty
'是否為空
if isempty(obj) then
blempty=true
else
blempty=false
end if
end property
public property get valid
'是否可用(過期)
if isempty(obj) or not isdate(expiretime) then
valid=false
elseif cdate(expiretime)