AnsweredAssumed Answered

Refresh Event Frame Cache

Question asked by Steve Boyko Champion on Jul 29, 2016
Latest reply on Jul 29, 2016 by David Hearn

I'm retrieving a list of event frames in ASP.NET (VB) and it works fine, but if I update one or more event frames while my program is running, I don't see the changes if I fetch the same event frames again. I'm pretty sure they are being cached by the AF client. How do I overcome this? I can exit Visual Studio and come back in again and it's OK, but even stopping the program and starting it again does not clear the program.

Here's my code, including an attempt to refresh the event frames.

            Dim afDB As AFDatabase = afSrv.Databases(afDatabase)

            Dim lst2 As New List(Of AFChangeInfo)
            Dim tm As AFTime = AFTime.Now.UtcTime.AddMinutes(-5)
            Dim cook As Object = Nothing
            lst2.AddRange(afDB.FindChangedItems(AFIdentity.EventFrames, False, Int32.MaxValue, cook, cook))
            AFChangeInfo.Refresh(afSrv, lst2)

            Dim afTemplateToFind As AFElementTemplate = afDB.ElementTemplates("mytemplatename")

            Dim eflist As AFNamedCollectionList(Of EventFrame.AFEventFrame)
            eflist = AFEventFrame.FindEventFrames(afDB, Nothing, "*", 0, 500,
                                                  AFEventFrameSearchMode.BackwardFromStartTime,
                                                  "*", "",
                                                  Nothing, afTemplateToFind, True)
            For Each ef As EventFrame.AFEventFrame In eflist
       -code-
            Next

Outcomes