...
When a user types a value into a text field (which is bound to a specific column of the database table) and clicks out, the Servoy Application Server issues a SQL update command to the database to modify the selected record. The resulting change is also broadcast|display/Serv7/Data+Broadcasting|||||||||||||||||||||||\ to all connected clients.
...
The fundamental unit of data binding in both the GUI and the API is the Servoy Foundset|display/Serv7/Foundsets+Concepts|||||||||||||||||||||||\ object.
...
If a data change originates from another application, client caches may become "stale" for the affected records, meaning that the cached values are not in sync with the last values stored to the database. This is most likely to happen if an existing record has already been cached prior to being updated by another application. It may also happen if records are added or deleted. However, the duration of the problem will be shorter for inserts and deletes than for updates. This is because while foundsets may reload primary keys periodically as the user navigates the client session, the contents of a record can remain cached indefinitely.
How can a "stale" cache be updated?
There are several approaches to updating a stale cacheFortunately, Servoy's APIs provides several opportunities to programmatically update client caches. The best approach depends on the situation.Also, Servoy's API provides a means to programmatically update client caches in cases where a record is modified outside of any Servoy Client session, i.e. from another application.
Flush All Client Caches
This approach will re-cache all records in all client caches for a specified database table. All foundsets based on the specified table will reissue their queries and all cached records will be refreshed from the database. This approach is the most comprehensive and therefore, most expensive in terms of performance. This approach is ideal to use when:
Notify Data Change
Refresh Record From Database
...