File size: 421 Bytes
268baab
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from abc import ABC, abstractmethod
from typing import Any

class CacheStrategy(ABC):
    """
    Defines the interface for the different cache system strategies (Local or Redis).
    """
    
    @abstractmethod
    def set(self, key: str, value: Any, language: str):
        pass

    @abstractmethod
    def get(self, key: str, language: str):
        pass

    @abstractmethod
    def clear_cache(self):
        pass