manager.go — fiber Source File
Architecture documentation for manager.go, a go file in the fiber codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 5f61d399_7b5a_6a35_411a_ef0a25ea52d4["manager.go"] cc7104af_aece_1fe5_3985_791c7f34910c["context"] 5f61d399_7b5a_6a35_411a_ef0a25ea52d4 --> cc7104af_aece_1fe5_3985_791c7f34910c style 5f61d399_7b5a_6a35_411a_ef0a25ea52d4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
package cache
import (
"context"
"errors"
"fmt"
"sync"
"time"
"github.com/gofiber/fiber/v3"
"github.com/gofiber/fiber/v3/internal/memory"
)
// msgp -file="manager.go" -o="manager_msgp.go" -tests=true -unexported
// Default slice limits are sized for cache payloads, with tighter field caps below.
//
//go:generate msgp -o=manager_msgp.go -tests=true -unexported
//nolint:revive // msgp requires tags on unexported fields for limit enforcement.
type item struct {
headers []cachedHeader `msg:",limit=1024"` // Typical HTTP header count stays well below this.
body []byte // Cache bodies are bounded by storage policy, not msgp limits.
ctype []byte `msg:",limit=256"` // Content-Type values are short per RFCs.
cencoding []byte `msg:",limit=128"` // Content-Encoding is typically a short token.
cacheControl []byte `msg:",limit=2048"` // Cache-Control directives are bounded.
expires []byte `msg:",limit=128"` // Expires is a short HTTP-date string.
etag []byte `msg:",limit=256"` // ETags are small tokens/quoted strings.
date uint64
status int
age uint64
exp uint64
ttl uint64
forceRevalidate bool
revalidate bool
shareable bool
private bool
// used for finding the item in an indexed heap
heapidx int
}
//nolint:revive // msgp requires tags on unexported fields for limit enforcement.
type cachedHeader struct {
key []byte `msg:",limit=512"` // Header names are small.
value []byte `msg:",limit=16384"` // Header values are bounded to reasonable sizes.
}
//msgp:ignore manager
type manager struct {
pool sync.Pool
memory *memory.Storage
storage fiber.Storage
redactKeys bool
}
const redactedKey = "[redacted]"
var errCacheMiss = errors.New("cache: miss")
func newManager(storage fiber.Storage, redactKeys bool) *manager {
// Create new storage handler
manager := &manager{
// ... (156 more lines)
Domain
Subdomains
Functions
Classes
Dependencies
- context
Source
Frequently Asked Questions
What does manager.go do?
manager.go is a source file in the fiber codebase, written in go. It belongs to the FiberMiddleware domain, Caching subdomain.
What functions are defined in manager.go?
manager.go defines 1 function(s): newManager.
What does manager.go depend on?
manager.go imports 1 module(s): context.
Where is manager.go in the architecture?
manager.go is located at middleware/cache/manager.go (domain: FiberMiddleware, subdomain: Caching, directory: middleware/cache).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free