Documentation
¶
Overview ¶
Example ¶
package main
import (
"cirello.io/sieve"
)
func main() {
cache := sieve.New[string](3)
cache.Access("A")
cache.Access("B")
cache.Access("C")
cache.Access("D")
cache.Show()
}
Output: D (Visited: false) -> C (Visited: false) -> B (Visited: false)
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache[T comparable] struct { // contains filtered or unexported fields }
func New ¶
func New[T comparable](capacity int) *Cache[T]
type Node ¶
type Node[T comparable] struct { Value T // contains filtered or unexported fields }
Source Files
¶
- sieve.go
Click to show internal directories.
Click to hide internal directories.