Skip to content

feat: initial support for dogpile caching#636

Merged
cofin merged 10 commits intolitestar-org:mainfrom
cofin:feat/dogpile
Jan 18, 2026
Merged

feat: initial support for dogpile caching#636
cofin merged 10 commits intolitestar-org:mainfrom
cofin:feat/dogpile

Conversation

@cofin
Copy link
Member

@cofin cofin commented Dec 15, 2025

Introduce support for dogpile caching, including a new caching configuration and a null region implementation for scenarios where caching is disabled or dogpile.cache is not installed. Add unit tests to validate the caching behavior and configuration options.

@codecov-commenter
Copy link

codecov-commenter commented Dec 15, 2025

Codecov Report

❌ Patch coverage is 66.21901% with 327 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.09%. Comparing base (298b4ce) to head (f76ebe3).

Files with missing lines Patch % Lines
advanced_alchemy/repository/_sync.py 45.79% 117 Missing and 12 partials ⚠️
advanced_alchemy/cache/manager.py 65.64% 82 Missing and 8 partials ⚠️
advanced_alchemy/repository/_async.py 66.80% 52 Missing and 27 partials ⚠️
advanced_alchemy/_listeners.py 78.49% 13 Missing and 7 partials ⚠️
advanced_alchemy/cache/serializers.py 94.25% 3 Missing and 2 partials ⚠️
advanced_alchemy/cache/_null.py 81.81% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #636      +/-   ##
==========================================
- Coverage   80.92%   79.09%   -1.83%     
==========================================
  Files          94       99       +5     
  Lines        6977     7861     +884     
  Branches      910     1065     +155     
==========================================
+ Hits         5646     6218     +572     
- Misses       1042     1301     +259     
- Partials      289      342      +53     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

cofin added 3 commits January 17, 2026 21:59
- Remove banned `from __future__ import annotations` imports
- Fix union syntax to use Optional/Union instead of X | Y
- Add proper docstrings replacing inline comments
- Move non-circular imports to top-level
- Add cache module documentation (usage guide and API reference)
- Quote forward references for TYPE_CHECKING imports
- Add missing use_cache parameter to get() method signature
- Add bind_group documentation to list() and list_and_count() docstrings
- Add missing TYPE_CHECKING imports for AsyncSession, scoped_session,
  async_scoped_session, and CacheManager in _listeners.py
- Add __init__.py to tests/unit/test_cache/ directory
cofin added 7 commits January 17, 2026 22:32
- Add SyncCacheRegionProtocol for sync cache region interface
- Add AsyncCacheRegionProtocol for async cache region interface
- Add NO_VALUE sentinel to _null.py exports
- Add _cache_manager class attribute to repository classes
- Fix pyright/mypy ignore comment placement on dogpile imports
- Update manager.py to use SyncCacheRegionProtocol
… operations and introduce integration tests.
…` imports and reformat long lines in cache integration tests for readability.
…e` extra, including its transitive dependencies `decorator` and `stevedore`.
@cofin cofin merged commit 8916358 into litestar-org:main Jan 18, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants