mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: add skip cache requesting
This commit is contained in:
@ -19,7 +19,7 @@ const RelationListView = (props: Props) => {
|
||||
const requests = relationList
|
||||
.filter((relation) => relation.type === MemoRelation_Type.REFERENCE)
|
||||
.map(async (relation) => {
|
||||
return await memoStore.getOrFetchMemoById(relation.relatedMemoId);
|
||||
return await memoStore.getOrFetchMemoById(relation.relatedMemoId, { skipStore: true });
|
||||
});
|
||||
const list = await Promise.all(requests);
|
||||
setReferencingMemoList(list);
|
||||
|
@ -22,13 +22,13 @@ const MemoRelationListView = (props: Props) => {
|
||||
const referencingMemoList = await Promise.all(
|
||||
relationList
|
||||
.filter((relation) => relation.memoId === memo.id && relation.relatedMemoId !== memo.id)
|
||||
.map((relation) => memoStore.getOrFetchMemoById(relation.relatedMemoId))
|
||||
.map((relation) => memoStore.getOrFetchMemoById(relation.relatedMemoId, { skipStore: true }))
|
||||
);
|
||||
setReferencingMemoList(referencingMemoList);
|
||||
const referencedMemoList = await Promise.all(
|
||||
relationList
|
||||
.filter((relation) => relation.memoId !== memo.id && relation.relatedMemoId === memo.id)
|
||||
.map((relation) => memoStore.getOrFetchMemoById(relation.memoId))
|
||||
.map((relation) => memoStore.getOrFetchMemoById(relation.memoId, { skipStore: true }))
|
||||
);
|
||||
setReferencedMemoList(referencedMemoList);
|
||||
})();
|
||||
|
@ -102,7 +102,7 @@ const MemoView: React.FC<Props> = (props: Props) => {
|
||||
(relation) => relation.memoId === memo.id && relation.type === MemoRelation_Type.COMMENT
|
||||
)?.relatedMemoId;
|
||||
if (parentMemoId) {
|
||||
memoStore.getOrFetchMemoById(parentMemoId).then((memo: Memo) => {
|
||||
memoStore.getOrFetchMemoById(parentMemoId, { skipStore: true }).then((memo: Memo) => {
|
||||
setParentMemo(memo);
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user