Skip to content

Commit

Permalink
try to solve caching problem for backlink history
Browse files Browse the repository at this point in the history
  • Loading branch information
zingmane committed Jan 16, 2019
1 parent 3ceb8de commit acfa30f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ sealed trait CreateHistoryModelBase extends DatabaseQuery {
s"XXX2: ${linkedTableId} ${linkedColumnId} $rowId $linkIdsToPutOrAdd $bidirectionalInsert")
linkIdsToPutOrAdd.map(linkId => {
for {
// invalidate dependent columns from backlinks point of view
_ <- tableauxModel.invalidateCellAndDependentColumns(linkedColumn, linkId)
_ <- createLinks(linkedTable,
linkId,
Seq((linkedColumn.asInstanceOf[LinkColumn], Seq(linkId))),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ class TableauxModel(
}
}

private def invalidateCellAndDependentColumns(column: ColumnType[_], rowId: RowId): Future[Unit] = {
def invalidateCellAndDependentColumns(column: ColumnType[_], rowId: RowId): Future[Unit] = {

def invalidateColumn: (TableId, ColumnId) => Future[_] =
CacheClient(this.connection).invalidateColumn
Expand Down

0 comments on commit acfa30f

Please sign in to comment.