cache

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opt ...func(conf *Config)) znet.HandlerFunc

func QueryKey

func QueryKey(c *znet.Context) (key string)

Types

type Config

type Config struct {
	zcache.Option
	// Custom key and expiration, default is the request path, key is empty not cached , 0 is the default expiration
	Custom func(c *znet.Context) (key string, expiration time.Duration)
}

Config configuration

Jump to

Keyboard shortcuts

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