cache

package module
v0.0.0-...-80f9206 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 3 Imported by: 5

README

About GoActivityPub: Cache

MIT Licensed Build Status Test Coverage Go Report Card

This project is part of the GoActivityPub library which helps with creating ActivityPub applications using the Go programming language.

It can be used to enable an in memory cache of ActivityPub objects keyed to their IDs.

You can find an expanded documentation about the whole library on SourceHut.

For discussions about the projects you can write to the discussions mailing list: ~mariusor/go-activitypub-discuss@lists.sr.ht

For patches and bug reports please use the dev mailing list: ~mariusor/go-activitypub-dev@lists.sr.ht

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivityPurge

func ActivityPurge(cache CanStore, a *vocab.Activity, additionalIRIs ...vocab.IRI) error

ActivityPurge removes from cache all items related to the "a" Activity. It can receive a batch of IRIs that need purging. Usually this is the inbox/outbox in which the activity was received.

func New

func New(enabled bool) *store

Types

type CanStore

type CanStore interface {
	Store(iri vocab.IRI, it vocab.Item)
	Load(iri vocab.IRI) vocab.Item
	Delete(iris ...vocab.IRI) bool
}

Jump to

Keyboard shortcuts

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