Documentation
¶
Index ¶
- func GetRemoteCacheObjectRev(in RemoteCacheObject) string
- type Cache
- type CacheExtract
- type ConfigFile
- type Hash
- type HashCache
- type HashCacheExtract
- type HashedConfiguration
- type HashedConfigurationRetriever
- type Object
- type ObjectFetcher
- type RemoteCache
- type RemoteCacheObject
- type RemoteCacheObjectRev
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRemoteCacheObjectRev ¶
func GetRemoteCacheObjectRev(in RemoteCacheObject) string
Types ¶
type Cache ¶
type Cache[K comparable, T any] interface { Get(ctx context.Context, key K) (T, error) Invalidate(key K) }
func NewCache ¶
func NewCache[K comparable, T any](extract CacheExtract[K, T]) Cache[K, T]
func NewCacheWithTTL ¶
func NewCacheWithTTL[K comparable, T any](extract CacheExtract[K, T], maxTTL time.Duration) Cache[K, T]
type CacheExtract ¶
type ConfigFile ¶
func NewConfigFile ¶
func NewConfigFile[T any](path string, ttl time.Duration) ConfigFile[T]
type HashCache ¶
func NewHashCache ¶
func NewHashCache[K Hash, T any](extract HashCacheExtract[K, T]) HashCache[K, T]
type HashCacheExtract ¶
type HashedConfiguration ¶
func NewHashedConfiguration ¶
func NewHashedConfiguration[T, S any](config ConfigFile[S], retriever HashedConfigurationRetriever[T, S]) HashedConfiguration[T]
type RemoteCache ¶
type RemoteCache[T RemoteCacheObject] interface { // Put puts the key in the cache Put(ctx context.Context, key string, obj T) error // Get gets the key from the cache // Returns T, Exists, Error Get(ctx context.Context, key string) (T, bool, error) // Remove removed the key from the cache // Returns Removed, Error Remove(ctx context.Context, key string) (bool, error) // Invalidate invalidates internal cache Invalidate(ctx context.Context, key string) // List lists the keys matching predicate from the server // Always misses the cache List(ctx context.Context, size int, prefix string) (util.NextIterator[[]string], error) }
func NewRemoteCache ¶
func NewRemoteCache[T RemoteCacheObject](collection Object[arangodb.Collection]) RemoteCache[T]
func NewRemoteCacheWithTTL ¶
func NewRemoteCacheWithTTL[T RemoteCacheObject](collection Object[arangodb.Collection], ttl time.Duration) RemoteCache[T]
type RemoteCacheObject ¶
type RemoteCacheObjectRev ¶
type RemoteCacheObjectRev interface { RemoteCacheObject GetRev() string }
Click to show internal directories.
Click to hide internal directories.