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

15 lines
437 B
Go
Raw Normal View History

2023-01-12 12:42:16 +00:00
package cache
import (
"context"
2023-11-25 09:49:20 +00:00
"github.com/fthvgb1/wp-go/cache/cachemanager"
"time"
)
2023-11-25 09:49:20 +00:00
func GetPostMetaByPostIds(ctx context.Context, ids []uint64) ([]map[string]any, error) {
return cachemanager.GetBatchBy[map[string]any]("postMetaData", ctx, ids, time.Second)
}
2023-11-25 09:49:20 +00:00
func GetPostMetaByPostId(ctx context.Context, id uint64) (map[string]any, error) {
return cachemanager.GetBy[map[string]any]("postMetaData", ctx, id, time.Second)
}