See the related thread on the West Wind Message board. THere are several things you can do in VFP, none of which are elegant.
+++ Rick ---
>>>We setup a system that uses table driven sessions, that keeps a number of variables stored in a memo. The problem is that when running two servers, the data is being temporarily cached in the two servers.
>>>
>>>If you hit the servers in rapid succession, you would receive the cached data instead of the real data. Of course if you delay, say about 2 seconds, everything appears fine.
>>>
>>>We've tried using a combination of FLUSH to force the write of the data and USE ... AGAIN a table that is already open to force a read. This prevents the caching but, the performance has suffered.
>>>
>>>What other approaches should we be trying?
>>
>>Is this a single record that both servers are editing and reading? If so, you probably need to RLOCK it to ensure it's not cached. Something like this:
>>FUNCTION ReadMemo
>>LOCAL lnTry, lnMaxTries, lcMemo
>>lcMemo = ""
>>FOR lnTry = 1 TO lnMaxTries
>> IF RLOCK()
>> lcMemo = <MemoFieldName>
>> UNLOCK
>> EXIT
>> ENDIF
>>ENDFOR
>>RETURN lcMemo
>
>Sorry, about the previous post. Hit send by mistake.
>
>Without a FLUSH, you won't be reading the most updated buffers. Also if you add a record, that hasn't been FLUSHed to disk, the other process won't see the new record.