Documentation ¶
Index ¶
- func AfterQuery(cache *GormCache) func(db *gorm.DB)
- func BeforeQuery(cache *GormCache) func(db *gorm.DB)
- func NewRedisConfigWithClient(client *redis.Client) *config.RedisConfig
- type GormCache
- func (c *GormCache) GetSearchCache(ctx context.Context, tableName string, sql string, vars ...interface{}) (string, error)
- func (c *GormCache) Init() error
- func (c *GormCache) Initialize(db *gorm.DB) (err error)
- func (c *GormCache) Name() string
- func (c *GormCache) SetSearchCache(ctx context.Context, cacheValue string, ttl int64, tableName string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AfterQuery ¶
func BeforeQuery ¶
func NewRedisConfigWithClient ¶
func NewRedisConfigWithClient(client *redis.Client) *config.RedisConfig
Types ¶
type GormCache ¶
type GormCache struct { Config *config.CacheConfig Logger config.LoggerInterface InstanceId string // contains filtered or unexported fields }
func NewGormCache ¶
func NewGormCache(cacheConfig *config.CacheConfig) (*GormCache, error)
func (*GormCache) GetSearchCache ¶
Click to show internal directories.
Click to hide internal directories.