Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachedPublication ¶
type CachedPublication struct {
*pub.Publication
Session *session.ReadingSessionDocument
Remote bool
CachedAt time.Time
Mu sync.RWMutex
// contains filtered or unexported fields
}
CachedPublication implements Evictable
func EncapsulatePublication ¶
func EncapsulatePublication(p *pub.Publication, doc *session.ReadingSessionDocument, remote bool) *CachedPublication
func (*CachedPublication) OnEvict ¶
func (cp *CachedPublication) OnEvict()
func (*CachedPublication) RefreshSession ¶ added in v0.7.0
func (cp *CachedPublication) RefreshSession(doc *session.ReadingSessionDocument)
RefreshSession swaps in a freshly-fetched reading session document and re-applies its metadata/links/rights onto the existing publication in place, avoiding an expensive reopen. The publication's injected rights service is updated atomically; the manifest mutation is guarded by Mu.
type LocalCache ¶
type TinyLFU ¶
type TinyLFU struct {
// contains filtered or unexported fields
}
func (*TinyLFU) UseRandomizedTTL ¶
Click to show internal directories.
Click to hide internal directories.