command
Version:
v0.15.2
Opens a new window with list of versions in this module.
Published: Oct 8, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
CacheGroup Example
This example shows how to create multiple caches that share one bounded
background runtime through daramjwee.NewGroup(...).
It demonstrates:
- one shared
CacheGroup
- two caches with different tier layouts
- group-level runtime options via
WithGroup...
- per-cache runtime tuning via
WithWeight(...) and WithQueueLimit(...)
Run
From this directory:
go run .
Expected flow:
- create one shared runtime with
WithGroupWorkers(2)
- create a
users cache with mem -> file
- create a
reports cache with file only
- fetch one value through each cache
- schedule background refresh on both caches
The example uses only local temporary directories and does not require any
external service.
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.