* feat(backend): redshift connector draft * fix(backend): fixed memory leak, empty string ddos * feat(backend): draft for sessions part * feat(backend): session handler * fix(backend): fixed wrong columns list in sessionToCSV convertor * feat(backend): load session info from db/cache if there is nothing in memory when sessionEnd event recieved * feat(backend): added filters for connector * feat(backend): memory leak fix + extra cache for sessions * feat(backend): moved table names as an env variable * fix(backend): added timeout for last session messages to avoid memory leak * fix(backend): fixed last memory leak * feat(backend): moved redshift connector to ee folder
30 lines
602 B
Go
30 lines
602 B
Go
package sessions
|
|
|
|
import (
|
|
"errors"
|
|
"openreplay/backend/pkg/db/redis"
|
|
)
|
|
|
|
type cacheImpl struct{}
|
|
|
|
func (c *cacheImpl) SetCache(sessID uint64, data map[string]string) error {
|
|
return ErrDisabledCache
|
|
}
|
|
|
|
func (c *cacheImpl) GetCache(sessID uint64) (map[string]string, error) {
|
|
return nil, ErrDisabledCache
|
|
}
|
|
|
|
func (c *cacheImpl) Set(session *Session) error {
|
|
return ErrDisabledCache
|
|
}
|
|
|
|
func (c *cacheImpl) Get(sessionID uint64) (*Session, error) {
|
|
return nil, ErrDisabledCache
|
|
}
|
|
|
|
var ErrDisabledCache = errors.New("cache is disabled")
|
|
|
|
func NewCache(db *redis.Client) Cache {
|
|
return &cacheImpl{}
|
|
}
|