Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Invalidator ¶
type Invalidator interface {
Invalidate(uniqueSuffix string)
}
Invalidator invalidates the given key in the document cache
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider manages document caches - one per channel/namespace combination
func (*Provider) CreateCachingOperationProcessor ¶
func (p *Provider) CreateCachingOperationProcessor(channelID string, cfg sidetreehandler.Config, target dochandler.OperationProcessor) dochandler.OperationProcessor
CreateCachingOperationProcessor updates the document cache for the given channel ID and namespace using the given configuration. The previous cache is replaced with the new one. The document cache stores the ResolutionResult in JSON format. Each document has an optional expiration which is specified in the Config.DocumentExpiry. If DocumentExpiry is 0 then the document never expires, but it still may be evicted to make room for other documents.
func (*Provider) GetDocumentInvalidator ¶
func (p *Provider) GetDocumentInvalidator(channelID, namespace string) (Invalidator, error)
GetDocumentInvalidator returns the invalidator for the given channel and namespace