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

15 lines
436 B
Go

package cache
import (
"context"
"github.com/fthvgb1/wp-go/cache/cachemanager"
"time"
)
func GetPostMetaByPostIds(ctx context.Context, ids []uint64) ([]map[string]any, error) {
return cachemanager.GetMultiple[map[string]any]("postMetaData", ctx, ids, time.Second)
}
func GetPostMetaByPostId(ctx context.Context, id uint64) (map[string]any, error) {
return cachemanager.Get[map[string]any]("postMetaData", ctx, id, time.Second)
}