Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { // Set adds a key-value pair to the cache with an optional expiration time. Set(ctx context.Context, key string, metadata *pb.Metadata) error // Get retrieves a value from the cache by its key. // Returns the value and a boolean indicating if the key was found. Get(ctx context.Context, key string) (*pb.Metadata, bool, error) // Delete removes a key-value pair from the cache by its key. Delete(ctx context.Context, key string) error // Clear removes all entries from the cache. Clear(ctx context.Context) error // Close cache conection Close() error }
Cache defines the behavior for a cache implementation.
func NewRedisCache ¶
NewRedisCache initializes a new Redis cache instance
Click to show internal directories.
Click to hide internal directories.