Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce pdo driver for symfony cache #1445

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

datengraben
Copy link
Contributor

This enables database based caching (mysql) via Symfony PDOAdapter for hosts where file based caching is not possible.

When a redis connection and pdo is enabled, pdo is used for caching and redis is used for caching the tags.

TODO

  • although it works. The pdoAdapter member variable which holds the adapter instance bloats the Plugin/Cache interface (bc it's private). It should be moved in a separated holder type.

This enables database based caching via Symfony PDOAdapter for hosts where file based caching is not possible.
When redis connection is enabled, it uses redis for caching of the tags.
@datengraben
Copy link
Contributor Author

@hansmorb was denkst du zur Verwendung der Oberfläche im Backend?

Copy link

codecov bot commented Dec 7, 2023

Codecov Report

Attention: 46 lines in your changes are missing coverage. Please review.

Comparison is base (637cb31) 39.76% compared to head (d22d35d) 42.96%.
Report is 60 commits behind head on master.

Files Patch % Lines
src/Service/Cache.php 11.76% 45 Missing ⚠️
src/Plugin.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1445      +/-   ##
============================================
+ Coverage     39.76%   42.96%   +3.20%     
- Complexity     2324     2395      +71     
============================================
  Files            91       91              
  Lines          9602     9507      -95     
============================================
+ Hits           3818     4085     +267     
+ Misses         5784     5422     -362     

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

@hansmorb
Copy link
Contributor

hansmorb commented Dec 7, 2023

Das ist vielleicht ein bisschen wild aber könnten wir nicht den ganzen Cache Backends ein Interface geben mit einer abstrakten Methode renderConnectionStatus und dann jeweils getConnectionError oder so ähnlich implementieren?
Dann haben wir zwar einen Wrapper für Interfaces in einem Interface gewrappt aber dann würden wir uns nicht so oft wiederholen. Oder wir bauen eine Methode, die den connectionStatus für jedes übergebene Interface rendert.

@datengraben
Copy link
Contributor Author

datengraben commented Dec 12, 2023 via email

@hansmorb
Copy link
Contributor

Wenn ich das aktiviere bekomme ich aktuell noch folgenden Fehler:
image

Das mit dem apply_filter können wir schon machen, weiss aber nicht ob das jemand ernsthaft nutzen wird. Schon bei dem REDIS Adapter bezweifle ich, dass das jemand nutzt.

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.

None yet

2 participants