Versions in this module Expand all Collapse all v1 v1.4.0 Nov 24, 2025 v1.3.0 Nov 4, 2025 Changes in this version + const DefaultKeyPrefix + const DefaultTableName + var ErrNilConn = errors.New("postgresql: connection cannot be nil") + var ErrNilPool = errors.New("postgresql: pool cannot be nil") + type Cache struct + func New(ctx context.Context, connString string, config *Config) (*Cache, error) + func NewWithConn(conn *pgx.Conn, config *Config) (*Cache, error) + func NewWithPool(pool *pgxpool.Pool, config *Config) (*Cache, error) + func (c *Cache) Close() + func (c *Cache) CreateTable(ctx context.Context) error + func (c *Cache) Delete(key string) + func (c *Cache) Get(key string) (resp []byte, ok bool) + func (c *Cache) Set(key string, resp []byte) + type Config struct + KeyPrefix string + TableName string + Timeout time.Duration + func DefaultConfig() *Config