diff --git a/fastloom/tenant/settings.py b/fastloom/tenant/settings.py index a8b1ceb..f22a031 100644 --- a/fastloom/tenant/settings.py +++ b/fastloom/tenant/settings.py @@ -68,7 +68,7 @@ class Configs[T: BaseModel, V: BaseModel](SelfSustaining): auth: JWTAuth optional_auth: OptionalJWTAuth documents_enabled: bool = False - cache_enabled: bool = False + cache_enabled: bool service_cls: type[T] tenant_cls: type[V] # cache @@ -82,6 +82,7 @@ def __init__( if self.self is not None: return super().__init__() + self.cache_enabled = False self.tenant_cls = tenant_cls self.service_cls = service_cls self.tenant_schema = SettingCacheSchema(self.tenant_cls) @@ -107,9 +108,10 @@ def _setup_redis(self): if not issubclass(self.service_cls, RedisSettings): return - self.cache_enabled = RedisHandler.enabled + handler = RedisHandler(self.general) + self.cache_enabled = handler.enabled - redis = RedisHandler(self.general).redis + redis = handler.redis BaseCache.Meta.database = redis BaseTenantSettingCache.Meta.database = redis self.tenant_schema.cache.Meta.database = redis diff --git a/plugins/fastloom-sdk/.claude-plugin/plugin.json b/plugins/fastloom-sdk/.claude-plugin/plugin.json index 1a3b7a8..1672ba4 100644 --- a/plugins/fastloom-sdk/.claude-plugin/plugin.json +++ b/plugins/fastloom-sdk/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "fastloom-sdk", "description": "Skills for services that consume the fastloom library \u2014 scaffold new services, add routes and RabbitMQ subscribers, audit settings.", - "version": "0.4.39", + "version": "0.4.40", "author": { "name": "aradng" }, diff --git a/pyproject.toml b/pyproject.toml index d5e3b86..0ccb290 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "fastloom" -version = "0.4.39" +version = "0.4.40" description = "Core package" authors = [] readme = "README.md"