From 2ca021e2c6599b39e6225fdbd449093517a34418 Mon Sep 17 00:00:00 2001 From: FChannel <=> Date: Sat, 23 Jan 2021 22:37:20 -0800 Subject: caching progress --- outboxGet.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'outboxGet.go') diff --git a/outboxGet.go b/outboxGet.go index 8eec74e..8c178a2 100644 --- a/outboxGet.go +++ b/outboxGet.go @@ -23,15 +23,13 @@ func GetActorOutbox(w http.ResponseWriter, r *http.Request, db *sql.DB) { w.Write(enc) } -func GetObjectsFromFollow(actor Actor) []ObjectBase { +func GetObjectsFromFollow(db *sql.DB, actor Actor) []ObjectBase { var followingCol Collection var followObj []ObjectBase followingCol = GetActorCollection(actor.Following) for _, e := range followingCol.Items { var followOutbox Collection - var actor Actor - actor = GetActor(e.Id) - followOutbox = GetActorCollection(actor.Outbox) + followOutbox = GetObjectFromCache(db, e.Id) for _, e := range followOutbox.OrderedItems { followObj = append(followObj, e) } -- cgit v1.2.3