Closes #13
This commit is contained in:
@@ -2,6 +2,7 @@ from abc import ABC
|
||||
from logging import Logger
|
||||
from typing import Optional, Any, Dict
|
||||
|
||||
from bson import ObjectId
|
||||
from libbot.cache.classes import Cache
|
||||
|
||||
from classes.abstract import Cacheable
|
||||
@@ -13,6 +14,8 @@ logger: Logger = get_logger(__name__)
|
||||
class BaseCacheable(Cacheable, ABC):
|
||||
"""Base implementation of Cacheable used by all cachable classes."""
|
||||
|
||||
_id: ObjectId
|
||||
|
||||
async def _set(self, cache: Optional[Cache] = None, **kwargs: Any) -> None:
|
||||
for key, value in kwargs.items():
|
||||
if not hasattr(self, key):
|
||||
|
Reference in New Issue
Block a user