clear_pending_operations
Discard all pending update and remove operations that were scheduled to be sent to your database from your
CachingTable
Not clearing the cache can create discrepancies
For example, if you delete a field, the field will right-away be deleted from the in-memory cache, and a delete
operation will be scheduled. If you clear the pending remove operations, the in-memory cache will not be changed,
and the deleted field will still be considered as deleted in the in-memory cache, but the delete operation responsible
for actually deleting the field value, will never be sent, since you would have cleared it. If you want to avoid all
risks, use the clear_cached_data_and_pending_operations
#
Operations considered as remove:- delete_record
- delete_field
- delete_multiple_fields
- remove_field (will be executed right away if the value to remove is not found in the cache)
- remove_multiple_fields (will be executed right away if the values to remove are not found in the cache)
#
Parametershas_pending_remove_operations has no parameters.
#
AvailabilityTable | Available |
---|---|
DynamoDBBasicTable | โฌ |
DynamoDBCachingTable | โ |
ExternalDynamoDBApiBasicTable | โฌ |
ExternalDynamoDBApiCachingTable | โ |
#
Related operations#
Example : Basic#
Queried record#
Code#
Output#
Example : DiscrepancyThis example displays how a data discrepancy can be created.