You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: cache.go
    path of file: ./repos/openreplay/backend/pkg/sessions
    
    the code of the file until where you have to start completion: package sessions

import (
	"errors"
	"log"
	"time"

	"openreplay/backend/pkg/cache"
)

type Cache interface {
	Set(session *Session) error
	Get(sessionID uint64) (*Session, error)
	SetCache(sessID uint64, data map[string]string) error
	GetCache(sessID uint64) (map[string]
    
func (i *inMemoryCacheImpl) Get(sessionID uint64) (*Session, error) {
	if session, ok := i.sessions.Get(sessionID); ok {
		return session.(*Session), nil
	}
	session, err := i.redis.Get(sessionID)
	if err == nil {
		i.sessions.Set(sessionID, session)
		return session, nil
	}
	if !errors.Is(err, ErrDisabledCache) && err.Error() != "redis: nil" {
		log.Printf("Failed to get session from cache: %v", err)
	}
	return nil, ErrSessionNotFound
}