Problem : Not clearing the cache.
At onLoad Event…
Code to run an agent using AJAX :
var myAjax = new Ajax.Request(
'http://'+server+'/'+database+'/PrintProjList?openagent',
{method: 'get', parameters: a.toQueryString(), onComplete: update_values_projectlist}
);
Agent Code :
Dim s As New notessession
Dim db As notesdatabase
Dim view As notesview
Dim doc As notesdocument
Dim dc As NotesDocumentCollection
Dim lists(1 To 300) As Variant
Dim ab As Variant
counter = 1
lists(counter)=Null
Set db=s.CurrentDatabase
Set doc1=s.DocumentContext
ecode=getQryStrValue( doc1.Query_String_Decoded(0), "key=" )
Set view=db.GetView("ProjectMaster")
Call view.Refresh
Call db.UpdateFTIndex( False )
Call view.Refresh
Call view.Refresh
j = view.FTSearch(ecode, 0 )
Call view.Refresh
Set doc=view.GetFirstDocument
lists(counter)=empty
While Not (doc Is Nothing)
lists( counter )=doc.ColumnValues( 10 )
sHTML="<style type='text/css'>td.sample{ padding : 2px; font : normal 9pt Verdana, Arial, sans-serif; border-color : #CECFCE #CECFCE #CECFCE #CECFCE; border-style : solid; border-top-width : 2px; border-right-width : 2px; border-bottom-width : 2px; border-left-width : 2px; background-color : rgb(239,239,239); }</style><table class='sample' width='100%'><tbody>" & lists( counter ) & "</tbody></table> "
Print sHTML
Set doc = view.GetNextDocument( doc )
counter = counter + 1
Wend
Call view.Clear
Now problem is if I do some changes in a particular document then it would not refelct as it is taking the document which are stored in cache.
Please let me know the solution.
Thanks