Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions fastloom/tenant/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion plugins/fastloom-sdk/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "fastloom"
version = "0.4.39"
version = "0.4.40"
description = "Core package"
authors = []
readme = "README.md"
Expand Down
Loading