# gcache-adapter **Repository Path**: johng/gcache-adapter ## Basic Information - **Project Name**: gcache-adapter - **Description**: Adapters for GoFrame package gcache. - **Primary Language**: Go - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-03-30 - **Last Updated**: 2021-03-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # gcache-adapter Adapters for package gcache. ## Requirements ```shell script gf version >= v1.14.0 ``` > Or using the `master` branch. ## Installation ```shell script go get -u github.com/gogf/gcache-adapter ``` ## Usage ### Import ```go import "github.com/gogf/gcache-adapter/adapter" ``` ### Normal Cache ```go cache := gcache.New() adapter := adapter.NewRedis(g.Redis()) cache.SetAdapter(adapter) ``` ### Change Database Cache From In-Memory To Redis ```go adapter := adapter.NewRedis(g.Redis()) g.DB().GetCache().SetAdapter(adapter) ```