user

package
v0.0.0-...-0864a4c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TTL = 1 * time.Hour
)

Variables

This section is empty.

Functions

func Get

func Get(uid uint64, start int32, length int32) ([]*entity.TimelineItem, error)

func MultiGet

func MultiGet(uids []uint64, limit int32) (map[uint64][]*entity.TimelineItem, error)

limit should not be greater than defaultFetchLimit

func Push

func Push(post *entity.Post) error

func Rebuild

func Rebuild(uid uint64, start int32, length int32) ([]*entity.TimelineItem, error)

*

  • rebuild cache and return [start:start+length]
  • lazy rebuild: rebuild only if timeline is not cached
  • using check-lock-check pattern

func Remove

func Remove(post *entity.Post) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL