GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - issue9/cache: 通用的缓存接口

BranchesTags
Open more actions menu

Latest commit

 

History

91 Commits
91 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
cachetest
cachetest
 
 
drivers
drivers
 
 
locales
locales
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
cache.go
cache.go
 
 
cache_test.go
cache_test.go
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
prefix.go
prefix.go
 
 
prefix_test.go
prefix_test.go
 
 

Repository files navigation

cache

codecov PkgGoDev Go version License

通用的缓存接口

目前支持以下组件:

名称 包 状态
memory 内存 memory
memcached <github.com/bradfitz/gomemcache> memcache
redis <github.com/redis/go-redis> memcache
// memory
c, _ := memory.New(...)
c.Set("number", 1)
var v int
c.Get("number",&v)
print(v)

// memcached
c = memcache.New("localhost:11211")
c.Set("number", 1)
c.Get("number", &v)
print(v)

n, setN, exists, err := c.Counter("n")
setN(-1) // 为 n 减 1
setN(10) // 为 n 加上 10

安装

go get github.com/issue9/cache

版权

本项目采用 MIT 开源授权许可证,完整的授权说明可在 LICENSE 文件中找到。

About

通用的缓存接口

pkg.go.dev/github.com/issue9/cache

Topics

cachememcached

Resources

Readme
MIT license
Activity
Custom properties

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.