witlili
作者witlili·2016-03-24 14:50
软件开发工程师·神州数码

清除Notes客户端缓存代码

字数 1329阅读 1144评论 0赞 0

时常在服务器修改Notes程序,但是需要Notes客户端重新打开才能生效,缓存导致。

可以添加一段程序,清除缓存。

**************************

Dim WorkSpace As New NotesUIWorkspace

Dim DbCache As NotesDatabase

Dim AllDocs As NotesDocumentCollection

Dim Doc, nextDoc As NotesDocument

Dim i As Integer

On erreur Goto ErrorHandling

Set DbCache = New NotesDatabase ("", "cache.ndk")

Set AllDocs = DbCache.AllDocuments

If AllDocs.Count > 0 Then

Print "deleting documents from cache.ndk ..."

Set Doc = AllDocs.GetFirstDocument

While Not ( Doc Is Nothing )

i = i + 1

Set NextDoc = AllDocs.GetNextDocument ( Doc )

Print "deleting documents from cache (" & Cstr (i) & "/" & Cstr ( AllDocs.Count ) & ")"

Call Doc.RemovePermanently ( True )

Set Doc = NextDoc

Wend

End If

Print "Compacting cache.ndk"

Call DbCache.Compact

Call WorkSpace.Prompt (1, "Cache.ndk Optimization", "Optimization ended with success. Ypu should restart Lotus Notes." )

Exit Sub

ErrorHandling :

Resume

Call WorkSpace.Prompt (1, "Cache.ndk Optimization", "An error has occured." )

**************************


weblink:

How to clear a Lotus Notes local cache (cache.ndk) with LotusScript

http://www-10.lotus.com/ldd/nd8forum.nsf/5f27803bba85d8e285256bf10054620d/e766c025cbe03b2085257513004fbe46

How to clear a Lotus Notes local cache with LotusScript

http://searchdomino.techtarget.com/tip/How-to-clear-a-Lotus-Notes-local-cache-with-LotusScript

如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!

0

添加新评论0 条评论

Ctrl+Enter 发表

作者其他文章

相关文章

相关问题

相关资料

X社区推广