package
Version:
v0.16.1
Opens a new window with list of versions in this module.
Published: Sep 7, 2020
License: MIT
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 27
Opens a new window with list of known importers.
README
¶
Cachego - File driver
The driver stores the cache data in file.
Usage
package main
import (
"log"
"time"
"github.com/faabiosr/cachego/file"
)
func main() {
cache := file.New("./cache-dir/")
if err := cache.Save("user_id", "1", 10*time.Second); err != nil {
log.Fatal(err)
}
id, err := cache.Fetch("user_id")
if err != nil {
log.Fatal(err)
}
log.Printf("user id: %s \n", id)
}
Documentation
¶
New creates an instance of File cache
Source Files
¶
Click to show internal directories.
Click to hide internal directories.