Documentation
¶
Index ¶
- type FileCacheDriver
- func (f *FileCacheDriver) Delete(key string) error
- func (f *FileCacheDriver) Get(key string) (interface{}, error)
- func (f *FileCacheDriver) Has(key string) (bool, error)
- func (f *FileCacheDriver) Init(config interface{}) error
- func (f *FileCacheDriver) Name() string
- func (f *FileCacheDriver) Set(key string, value interface{}, expiration time.Duration) error
- type MapCacheDriver
- func (r *MapCacheDriver) Delete(key string) error
- func (r *MapCacheDriver) Get(key string) (interface{}, error)
- func (r *MapCacheDriver) Has(key string) (bool, error)
- func (r *MapCacheDriver) Init(config interface{}) error
- func (r *MapCacheDriver) Name() string
- func (r *MapCacheDriver) Set(key string, value interface{}, expiration time.Duration) error
- type RedisCacheDriver
- func (r *RedisCacheDriver) Delete(key string) error
- func (r *RedisCacheDriver) Get(key string) (interface{}, error)
- func (r *RedisCacheDriver) Has(key string) (bool, error)
- func (r *RedisCacheDriver) Init(config interface{}) error
- func (r *RedisCacheDriver) Name() string
- func (r *RedisCacheDriver) Set(key string, value interface{}, expiration time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileCacheDriver ¶
type FileCacheDriver struct {
// contains filtered or unexported fields
}
FileCacheDriver structure for file-based caching
func (*FileCacheDriver) Delete ¶
func (f *FileCacheDriver) Delete(key string) error
Delete removes data from the file
func (*FileCacheDriver) Get ¶
func (f *FileCacheDriver) Get(key string) (interface{}, error)
Get retrieves data from a file
func (*FileCacheDriver) Has ¶
func (f *FileCacheDriver) Has(key string) (bool, error)
Has checks if a key exists in the filesystem
func (*FileCacheDriver) Init ¶
func (f *FileCacheDriver) Init(config interface{}) error
Init initializes the FileCacheDriver with the given configuration
func (*FileCacheDriver) Name ¶
func (f *FileCacheDriver) Name() string
Name implements cache.CacheDriver.
type MapCacheDriver ¶
type MapCacheDriver struct {
// contains filtered or unexported fields
}
MapCacheDriver is a structure for in-memory caching.
func (*MapCacheDriver) Delete ¶
func (r *MapCacheDriver) Delete(key string) error
Delete removes data from the cache by key.
func (*MapCacheDriver) Get ¶
func (r *MapCacheDriver) Get(key string) (interface{}, error)
Get retrieves data from the cache by key.
func (*MapCacheDriver) Has ¶
func (r *MapCacheDriver) Has(key string) (bool, error)
Has checks if a key exists in the cache and has not expired.
func (*MapCacheDriver) Init ¶
func (r *MapCacheDriver) Init(config interface{}) error
Init initializes the cache with the provided configuration.
func (*MapCacheDriver) Name ¶
func (r *MapCacheDriver) Name() string
Name returns the name of the cache driver.
type RedisCacheDriver ¶
type RedisCacheDriver struct {
// contains filtered or unexported fields
}
RedisCacheDriver is a structure for managing caching using Redis.
func (*RedisCacheDriver) Delete ¶
func (r *RedisCacheDriver) Delete(key string) error
Delete removes data from Redis by key.
func (*RedisCacheDriver) Get ¶
func (r *RedisCacheDriver) Get(key string) (interface{}, error)
Get retrieves data from Redis by key.
func (*RedisCacheDriver) Has ¶
func (r *RedisCacheDriver) Has(key string) (bool, error)
Has checks if a key exists in Redis.
func (*RedisCacheDriver) Init ¶
func (r *RedisCacheDriver) Init(config interface{}) error
Init initializes the Redis cache driver with the provided configuration.
func (*RedisCacheDriver) Name ¶
func (r *RedisCacheDriver) Name() string
Name returns the name of the cache driver.