-
Notifications
You must be signed in to change notification settings - Fork 3
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
Create Serializable Redis Adapter and ApcuAdapter disabled in CLI #17
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## 1.x #17 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 42 46 +4
===========================================
Files 23 24 +1
Lines 106 110 +4
===========================================
+ Hits 106 110 +4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
5e648f6
to
7726b41
Compare
7726b41
to
9de40ee
Compare
b3e2e43
to
3350617
Compare
cc97860
to
ffcf079
Compare
ffcf079
to
c894dad
Compare
53ffdab
to
aca7043
Compare
95049e1
to
aca7043
Compare
4a6e855
to
75b0f2c
Compare
75b0f2c
to
7ce73db
Compare
Redis is not serializable.
fde3884
to
583db6f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a
src/Psr6RedisModule.php
Outdated
// @codeCoverageIgnoreEnd | ||
} | ||
|
||
$this->bind(Redis::class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
新しく実装された RedisAdapter はシリアライズ可能にするために Providerを注入されるようになりましたが、
ここでのアンターゲット束縛は上記とは関係ないという理解であっていますかね?
Redis を束縛する場合は RedisProvider を使わないとコネクション情報などを利用できないのでこのアンターゲット束縛自体は意味がないのかなと。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
確かにここ不要です。suggest してもらっていいでしょうか?
* @Named("redisProvider=redis") | ||
*/ | ||
#[CacheNamespace('namespace')] | ||
#[Named('redisProvider=redis')] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provider注入であれば、 #Set
を使うのはどうですかね?
Redis が Provider束縛であれば使えるんですかね。
redis is obtained from provider, so no bundling is required Co-authored-by: Naoki Tsuchiya <tsuchiya@bengo4.com>
RedisAdapterはシリアライズ不可能で、またRedisそのものもシリアライズしてしまうと復元したときに機能しないようでその点を対策したPRです。