Spaces:
Sleeping
Sleeping
Download internal/cache/interface.go from AmaniQuery/amaniquery-agent: direct link, hf CLI and curl.
- Browser
- Download file 553 Bytes
-
https://huggingface.co/spaces/AmaniQuery/amaniquery-agent/resolve/main/internal/cache/interface.go
- Command line
-
hf download hf://spaces/AmaniQuery/amaniquery-agent/internal/cache/interface.go
-
curl -L -o interface.go https://huggingface.co/spaces/AmaniQuery/amaniquery-agent/resolve/main/internal/cache/interface.go
553 Bytes
| // Package cache provides the canonical Cache interface for AmaniQuery. | |
| package cache | |
| import ( | |
| "context" | |
| "time" | |
| ) | |
| type Cache interface { | |
| Get(ctx context.Context, key string) ([]byte, error) | |
| Set(ctx context.Context, key string, value []byte, ttl time.Duration) error | |
| Delete(ctx context.Context, key string) error | |
| GetOrSet(ctx context.Context, key string, fn func() ([]byte, error), ttl time.Duration) ([]byte, error) | |
| DeleteByPrefix(ctx context.Context, prefix string) error | |
| NormalizeKey(parts ...string) string | |
| Healthy() bool | |
| Close() error | |
| } | |