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).
Click to show internal directories.
Click to hide internal directories.