|
getCustomDictionaryModifiedDate
Returns last modified date of custom dictionary by filename or ID. This is useful for ensuring that the addCustomDictionaryFromArray is not called too often (as it is processor intensive).
Example
<%
set objDYM = server.createObject("ASPDidYouMean.DidYouMean")
arrWordsArray= Array("jacob","lynann","samuel")
TimeDifference = DateDiff("n", objDYM.getCustomDictionaryModifiedDate("NAMES"), now())
response.write TimeDifference
if TimeDifference > 15 Then ' 15 mins
objDYM.addCustomDictionaryFromArray "NAMES",arrWordsArray , True
end if
%>
|