sql/swh-func: content cache populates lines in deterministic order
This should reduce lock contention when parallelizing the operation