Skip to content

Conversation

@cicnavi
Copy link
Collaborator

@cicnavi cicnavi commented Nov 4, 2024

This PR introduces caching capabilities on UserRepository as a demonstration of proposed implementation. I plan to do similarly on other repositories as well (but it will be a bit more complicated).

The intention is to enable implementor to configure 'Protocol Cache', which would then be used 'in front of' the regular database storage for protocol artifacts like tokens, and also for oidc clients and user data. Any Symfony cache adapter is supported. If the 'Protocol Cache' is not enabled or artifact is not cached, everything falls back to database.

If the implementor chooses to enable this, and enables some 'memory-capable' adapter, like memcache or similar, this should significantly improve performance, especially in cases like sudden surge of users when the database-only-storage becomes a noticable bootleneck.

@cicnavi cicnavi requested a review from pradtke November 4, 2024 14:30
@codecov
Copy link

codecov bot commented Nov 4, 2024

Codecov Report

Attention: Patch coverage is 53.96825% with 29 lines in your changes missing coverage. Please review.

Project coverage is 43.33%. Comparing base (86d9b49) to head (01ae825).
Report is 1 commits behind head on wip-version-6.

Files with missing lines Patch % Lines
src/Services/Container.php 0.00% 21 Missing ⚠️
src/ModuleConfig.php 0.00% 7 Missing ⚠️
src/Repositories/AbstractDatabaseRepository.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##             wip-version-6     #264      +/-   ##
===================================================
+ Coverage            43.27%   43.33%   +0.06%     
- Complexity            1341     1343       +2     
===================================================
  Files                  143      143              
  Lines                 5588     5631      +43     
===================================================
+ Hits                  2418     2440      +22     
- Misses                3170     3191      +21     

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

@cicnavi cicnavi merged commit d59b3d0 into wip-version-6 Nov 13, 2024
20 checks passed
@cicnavi cicnavi deleted the wip-version-6-federation branch November 13, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants