Can’t find a way to replace whole ets table (i.e. all records) at once.
- There is
tab2list
function, but nolist2tab
. -
file2tab
crates table, doesn’t update existing one - Emptying existing table +
insert
leaves the gap in between. insert operation is atomic by itself, but combination of two calls is not
Maybe some smart merging will help, deleting stale records, updating existing records after that, but that’s expensive and feels wrong.
Context: i’m getting list of items from outside every X minutes, and want to cache them, to be used in app