Documentation ¶
Overview ¶
Package cachestore use for custom store for caching historical currency rates
Index ¶
- Constants
- type MySQLStore
- func (store *MySQLStore) Clear() error
- func (store *MySQLStore) Delete(key interface{}) error
- func (store *MySQLStore) Get(key interface{}) (interface{}, error)
- func (store *MySQLStore) GetType() string
- func (store *MySQLStore) GetWithTTL(key interface{}) (interface{}, time.Duration, error)
- func (store *MySQLStore) Invalidate(options store.InvalidateOptions) error
- func (store *MySQLStore) Set(key interface{}, value interface{}, options *store.Options) error
Constants ¶
View Source
const MySQLType = "mysql"
MySQLType represents the storage type as a string value
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySQLStore ¶
type MySQLStore struct {
// contains filtered or unexported fields
}
MySQLStore used for store immutable (historical) currency rates in L2 cache in database (MySQL)
func NewMySQLStore ¶
func NewMySQLStore(client *gorm.DB, options *store.Options) *MySQLStore
NewMySQLStore creates a new store to Memcache instance(s)
func (*MySQLStore) Clear ¶
func (store *MySQLStore) Clear() error
Clear does not affected, as MySQLStore is persistent storage
func (*MySQLStore) Delete ¶
func (store *MySQLStore) Delete(key interface{}) error
Delete does not affected, as MySQLStore is persistent storage
func (*MySQLStore) Get ¶
func (store *MySQLStore) Get(key interface{}) (interface{}, error)
Get gets value by key
func (*MySQLStore) GetType ¶
func (store *MySQLStore) GetType() string
GetType returns type for store
func (*MySQLStore) GetWithTTL ¶
func (store *MySQLStore) GetWithTTL(key interface{}) (interface{}, time.Duration, error)
GetWithTTL gets value and ttl by key
func (*MySQLStore) Invalidate ¶
func (store *MySQLStore) Invalidate(options store.InvalidateOptions) error
Invalidate does not affected, as MySQLStore is persistent storage
Click to show internal directories.
Click to hide internal directories.