wp-go/internal/pkg/cache/postmeta.go

16 lines
385 B
Go
Raw Permalink Normal View History

2023-01-12 12:42:16 +00:00
package cache
import (
"context"
"time"
)
func GetPostMetaByPostIds(ctx context.Context, ids []uint64) (r []map[string]any, err error) {
r, err = postMetaCache.GetCacheBatch(ctx, ids, time.Second, ctx, ids)
return
}
func GetPostMetaByPostId(ctx context.Context, id uint64) (r map[string]any, err error) {
r, err = postMetaCache.GetCache(ctx, id, time.Second, ctx, id)
return
}