Categorygithub.com/gflydev/cache
modulepackage
1.0.4
Repository: https://github.com/gflydev/cache.git
Documentation: pkg.go.dev

# README

gFly Caching

Copyright © 2023, gFly
https://www.gFly.dev
All rights reserved.

Usage

Install

go get -u github.com/gflydev/[email protected]

Quick usage main.go

import (
    cacheRedis "github.com/gflydev/cache/redis"
    "github.com/gflydev/cache"
)

// Register Redis cache
cache.Register(cacheRedis.New())

// Set cache 15 days
if err = cache.Set(key, value, time.Duration(15*24*3600) * time.Second); err != nil {
    log.Errorf("Error %q", err)
}

val, err := cache.Get(key)
if err != nil {
    log.Errorf("Error %q", err)
}

// Delete 
if err = cache.Del(key); err != nil {
    log.Errorf("Error %q", err)
}

# Packages

No description provided by the author

# Functions

No description provided by the author
No description provided by the author
Key wrapper key.
Register assign cache manager.
No description provided by the author

# Interfaces

No description provided by the author