cacheflush

package
v3.1.0-beta.11 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package cacheflush executes the optional Lua callback used by cache flush endpoints.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	// AdditionalKeys contains additional Redis keys to delete.
	AdditionalKeys []string

	// AccountName is an optional account name. If non-empty, the caller can skip account lookup.
	AccountName string
}

Result holds the return values from the Lua cache flush script.

func RunCacheFlushScript

func RunCacheFlushScript(ctx context.Context, cfg config.File, logger *slog.Logger, redisClient rediscli.Client, user string, guid string) (result *Result, err error)

RunCacheFlushScript executes the configured Lua cache flush script. It passes the user information as a request table and returns additional Redis keys and an optional account name from the script. If no script is configured, it returns nil (no-op).

Jump to

Keyboard shortcuts

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