Filecache
Go File Cache
Install / Use
/learn @DannyBen/FilecacheREADME
Go File Cache
This package provides easy to use, file system cache functions.
Full documentation is at: godoc.org/github.com/DannyBen/filecache
Install
$ go get github.com/DannyBen/filecache
Usage
Get the cache handler and set a cache directory and the requested cache life, in minutes:
handler := filecache.Handler{"./cache", 60}
Store data in the cache by providing a string key to the Set method
and []byte data. The key's md5 checksum will be used as the filename.
data := []byte("Joey doesn't share food")
handler.Set("testkey", data)
Retrieve data from the cache:
r := handler.Get("testkey")
if r == nil {
fmt.Println("Cache has expired")
} else {
fmt.Println(string(r))
}
Related Skills
node-connect
351.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。

