Thursday
Feb212013
SquidRefresh
- All cached information will be written to SQUID and be available to all users.
- Calls SquidIsDirty. If not dirty, nothing is done (all has been written).
Prototype
int SquidRefresh(int iSquid, char* sParam);
- Parameters
iSquid Squid Connection Handle sParam String containing the name of the column
- Return Values
0 Operation successful -1 Error occurred, call SquidGetLastError for details
Example
// SquidSendData 10000 times, wrapped in SquidPause/SquidResume calls and
// calling SquidRefresh every 1000 sends.
int iSquid;
lr_load_dll("SQUID-REST.dll");
iSquid = SquidConnect("http://localhost:8000");
SquidPause (iSquid, "col");
for (i=1; i<=10000; i++)
{
if (i==5000)
{
lr_output_message("dirty=%d", SquidIsDirty(iSquid,"col"));
}
sprintf (strBuffer, "LR-SEND3-%03d-%05d", iVuserId, i);
SquidSendData (iSquid, "col", strBuffer);
if (i % 1000 == 0)
{
SquidRefresh (iSquid, "col");
}
if (i==5000)
{
lr_output_message("dirty=%ld", SquidIsDirty(iSquid,"col"));
}
}
SquidResume (iSquid, "col");
SquidDisconnect(iSquid0;