Zooflow: Clear cache for DocumentResultList

This commit is contained in:
Jonathan Jenne
2022-02-23 16:10:54 +01:00
parent d13b3b7dc1
commit 351317195d
14 changed files with 185 additions and 428 deletions

View File

@@ -29,10 +29,20 @@ Namespace DocumentResultList
Cache = New Cache(pLogConfig, 104_900_000)
End Sub
''' <summary>
''' Removes a Document from the cache
''' </summary>
Public Sub Invalidate(pDocument As Document)
Cache.Remove(pDocument)
End Sub
''' <summary>
''' Clears the cache completely
''' </summary>
Public Sub ClearCache()
Cache.Clear()
End Sub
Public Function Load(pObjectId As Long, pFullPath As String, Optional pForce As Boolean = False) As Document
Dim oDocument As Document = Nothing

View File

@@ -381,8 +381,13 @@ Public Class frmDocumentResultList
Else
_IsLoading = True
Try
' Save the new results
_ResultLists = pResults
' Remove the current document from
Documentloader.ClearCache()
' Update the grid
UpdateTotalResults()
UpdateGridData()