func (c *Cache) Delete(ctx context.Context, key string) error {
	return c.driver.Delete(ctx, key)
}
Deletes deletes an object identified by key from the cache.
package cache
import (
	"context"
)
const defaultMaxSizeToCache int = 10 * 1024 * 1024  
type Cache struct {
	driver         Driver
	MaxSizeToCache int
}
func New(driver Driver) *Cache {
	return &Cache{
		driver:         driver,
		MaxSizeToCache: defaultMaxSizeToCache,
	}
}
func (c *Cache) Set(ctx context.Context, object Cacheable) error {
	encoded, err := object.EncodeBytes()
	if err != nil {
		return err
	}
	if len(encoded) > c.MaxSizeToCache {
		return c.Delete(ctx, object.CacheKey())
	}
	return c.driver.Set(ctx, object.CacheKey(), encoded)
}
func (c *Cache) Get(ctx context.Context, key string, dest Cacheable) error {
	stored, err := c.driver.Get(ctx, key)
	if err != nil {
		return err
	}
	return dest.DecodeBytes(stored)
}