diff --git a/app/utils/cache.py b/app/utils/cache.py index a3e582a9..70307970 100644 --- a/app/utils/cache.py +++ b/app/utils/cache.py @@ -1,7 +1,7 @@ """ Lightweight Redis caching layer for frequently accessed data. -Provides a thin wrapper around Redis GET/SET with JSON serialisation and +Provides a thin wrapper around Redis GET/SET with JSON serialization and configurable TTLs. All operations are **fail-open**: if Redis is unavailable the caller simply gets a cache miss and falls back to the database or other source of truth. diff --git a/docs/ConfigurationGuide.md b/docs/ConfigurationGuide.md index 844bfc2e..941d5dec 100644 --- a/docs/ConfigurationGuide.md +++ b/docs/ConfigurationGuide.md @@ -800,7 +800,7 @@ UI_DEFAULT_COLOR_SCHEME=dark ## Performance & Caching -DocuElevate automatically optimises database access and uses Redis as a +DocuElevate automatically optimizes database access and uses Redis as a caching layer for frequently accessed data. ### Database Indexes diff --git a/tests/test_cache.py b/tests/test_cache.py index 59ec3dab..e869e027 100644 --- a/tests/test_cache.py +++ b/tests/test_cache.py @@ -50,7 +50,7 @@ def test_cache_get_returns_none_on_miss(): @pytest.mark.unit def test_cache_get_returns_deserialized_value(): - """cache_get should deserialise the stored JSON string.""" + """cache_get should deserialize the stored JSON string.""" mock_client = MagicMock() mock_client.get.return_value = json.dumps(["application/pdf", "image/png"]) with patch("app.utils.cache._get_redis", return_value=mock_client):