diff options
author | 2023-07-24 13:14:13 +0100 | |
---|---|---|
committer | 2023-07-24 13:14:13 +0100 | |
commit | 9eff0d46e49b947dc2642207ee49ed657eb6b565 (patch) | |
tree | 62994afff170737d83f1ed911e385504a0ad16cd /internal/db/media.go | |
parent | [chore]: Bump github.com/microcosm-cc/bluemonday from 1.0.24 to 1.0.25 (#2021) (diff) | |
download | gotosocial-9eff0d46e49b947dc2642207ee49ed657eb6b565.tar.xz |
[feature/performance] support uncaching remote emoji + scheduled cleanup functions (#1987)
Diffstat (limited to 'internal/db/media.go')
-rw-r--r-- | internal/db/media.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/db/media.go b/internal/db/media.go index 01bca1748..5fb18a8fe 100644 --- a/internal/db/media.go +++ b/internal/db/media.go @@ -44,12 +44,12 @@ type Media interface { // GetAttachments ... GetAttachments(ctx context.Context, maxID string, limit int) ([]*gtsmodel.MediaAttachment, error) - // GetRemoteOlderThan gets limit n remote media attachments (including avatars and headers) older than the given - // olderThan time. These will be returned in order of attachment.created_at descending (newest to oldest in other words). - // - // The selected media attachments will be those with both a URL and a RemoteURL filled in. - // In other words, media attachments that originated remotely, and that we currently have cached locally. - GetRemoteOlderThan(ctx context.Context, olderThan time.Time, limit int) ([]*gtsmodel.MediaAttachment, Error) + // GetRemoteAttachments ... + GetRemoteAttachments(ctx context.Context, maxID string, limit int) ([]*gtsmodel.MediaAttachment, error) + + // GetCachedAttachmentsOlderThan gets limit n remote attachments (including avatars and headers) older than + // the given time. These will be returned in order of attachment.created_at descending (i.e. newest to oldest). + GetCachedAttachmentsOlderThan(ctx context.Context, olderThan time.Time, limit int) ([]*gtsmodel.MediaAttachment, Error) // CountRemoteOlderThan is like GetRemoteOlderThan, except instead of getting limit n attachments, // it just counts how many remote attachments in the database (including avatars and headers) meet |