Documentation
¶
Index ¶
- type SessionRepositoryCached
- func (r *SessionRepositoryCached) GetSession(ctx context.Context, id common.Hash) (*sessionModel, error)
- func (r *SessionRepositoryCached) RefreshSession(ctx context.Context, id common.Hash) error
- func (r *SessionRepositoryCached) RemoveSession(ctx context.Context, id common.Hash) error
- func (r *SessionRepositoryCached) SaveSession(ctx context.Context, ses *sessionModel) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SessionRepositoryCached ¶
type SessionRepositoryCached struct {
// contains filtered or unexported fields
}
func NewSessionRepositoryCached ¶
func NewSessionRepositoryCached(storage *storages.SessionStorage, reg *registries.SessionRouter, mkt *registries.Marketplace) *SessionRepositoryCached
func (*SessionRepositoryCached) GetSession ¶
func (r *SessionRepositoryCached) GetSession(ctx context.Context, id common.Hash) (*sessionModel, error)
GetSession returns a session by its ID from the read-through cache
func (*SessionRepositoryCached) RefreshSession ¶
RefreshSession refreshes the session cache by fetching the session from the blockchain
func (*SessionRepositoryCached) RemoveSession ¶
RemoveSession removes a session from the cache
func (*SessionRepositoryCached) SaveSession ¶
func (r *SessionRepositoryCached) SaveSession(ctx context.Context, ses *sessionModel) error
SaveSession saves a session to the cache. Before saving it to cache you have to call GetSession
Click to show internal directories.
Click to hide internal directories.