caching

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SubscriptionService

type SubscriptionService struct {
	// contains filtered or unexported fields
}

SubscriptionService creates in-memory cache service

func New

func New(daoService dao.IDAO) *SubscriptionService

New creates caching subscription service

func (*SubscriptionService) GetSubscription

func (s *SubscriptionService) GetSubscription(subscriptionID, hostname string) (service.Lookup, error)

GetSubscription attempts to get subscription from cache If not successful it attempts to load from dao and updates cache

func (*SubscriptionService) Load

func (s *SubscriptionService) Load() error

Load loads subscriptions from dao to cache

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL