cache

package
v0.0.0-...-1cbd5cf Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCacheJSON

func GetCacheJSON(c *redis.Client) (string, error)

GetCacheJSON marshals cached data into JSON, calls GetCache to get the Cache struct.

Types

type Cache

type Cache struct {
	Count    int64     `json:"count"`
	Total    int64     `json:"total"`
	Messages []Message `json:"messages"`
}

Cache is used in the messages.html template.

func GetCache

func GetCache(c *redis.Client) (*Cache, error)

GetCache gets cached data from Redis.

type Message

type Message struct {
	models.Message
	TimeFmt string `json:"timefmt"`
}

Message adds additional fields to models.Message.

Jump to

Keyboard shortcuts

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