Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[HttpFoundation] Native Redis Session Storage#3498

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 2 commits intosymfony:masterfrompulzarraider:redis_session_storage
Mar 23, 2012

Conversation

@pulzarraider
Copy link
Contributor

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

As the method only call its parent, I suppose we can remove it, no?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Yes, I haven't noticed that it is unnecessary.
Thanks,@fabpot.

@lstrojny
Copy link
Contributor

Does Symfony (or any of its dependencies) has Redis support in any form whatsoever? If not this might be a good point to decide which clients to support

@lsmith77
Copy link
Contributor

well ideally we just get this cache interface stuff done .. for this use case it would be perfect.

@pulzarraider
Copy link
ContributorAuthor

There is RedisProfilerStorage available (based on phpredis). I prefer and write code forphpredis.

It's recommended byofficial Redis homepage.In this benchmark is fastest and less memory consumpting.

But if somebody prefer predis (with phpiredis), rediska or something other widely used, there are no limitations to add support of it to Symfony.

My opinion is, that the C extension should be supported at first, because of good performance and native session storage support. Redis is quite young and the process of creating PHP clients is comparable to Memcache.
There were created pure PHP Memcache clients in the past (Google found for examplethis andthis), but they are not being used now. Everyone, who is seriously thinking about performance, is using only the C Redis/Memcache(d)/... extensions.

@ghost
Copy link

+1 on this PR. Needs a test written though.
I don't think there is any need to wait for#3493 imo. I'll deal with it if this is merged before#3493.
Are there any PHP ini settings for this for this driver or is everything via thesession.save_path directive? (A quick look at the C code seems to indicate there are no explicit ini directives).

@lstrojny
Copy link
Contributor

@pulzarraider I don’t necessarily disagree with the usage of phpredis, I just wanted to bring up the issues of various clients and people having different preferences about them.

@fabpot
Copy link
Member

@pulzarraider Can you add some unit tests before I merge?

@pulzarraider
Copy link
ContributorAuthor

@Drak No there are no php.ini settings. Only RedisArray has some, but it's another feature.

@fabpot I've added simple test based on other session storage tests.

I planned to create a RedisSessionStorage, too, but I have no time for it now. This can be added later in another PR as it's independent from NativeRedisSessionStorage.

@ghost
Copy link

The code looks OK to me.

@fabpot
Copy link
Member

#3493 has been merged now.

@pulzarraider
Copy link
ContributorAuthor

Code updated.

fabpot added a commit that referenced this pull requestMar 23, 2012
Commits-------c4ee947 Native Redis Session Storage update665f593 NativeRedisSessionStorage addedDiscussion----------[HttpFoundation] Native Redis Session StorageBug fix: noFeature addition: yesBackwards compatibility break: noSymfony2 tests pass: yesFixes the following tickets: -Todo: ----------------------------------------------------------------------------by lstrojny at 2012-03-04T23:15:43ZDoes Symfony (or any of its dependencies) has Redis support in any form whatsoever? If not this might be a good point to decide which clients to support---------------------------------------------------------------------------by lsmith77 at 2012-03-04T23:36:11Zwell ideally we just get this cache interface stuff done .. for this use case it would be perfect.---------------------------------------------------------------------------by pulzarraider at 2012-03-05T00:35:59ZThere is RedisProfilerStorage available (based on phpredis). I prefer and write code for [phpredis](https://github.com/nicolasff/phpredis).It's recommended by [official Redis homepage](http://redis.io/clients#PHP). [In this benchmark](http://dev.af83.com/2011/01/01/which-php-library-to-use-with-redis-the-benchmark.html) is fastest and less memory consumpting.But if somebody prefer predis (with phpiredis), rediska or something other widely used, there are no limitations to add support of it to Symfony.My opinion is, that the C extension should be supported at first, because of good performance and native session storage support. Redis is quite young and the process of creating PHP clients is comparable to Memcache.There were created pure PHP Memcache clients in the past (Google found for example [this](http://www.phpclasses.org/browse/file/20284.html) and [this](http://code.blitzaffe.com/pages/phpclasses/files/memcached_client_52-12)), but they are not being used now. Everyone, who is seriously thinking about performance, is using only the C Redis/Memcache(d)/... extensions.---------------------------------------------------------------------------by drak at 2012-03-05T07:40:06Z+1 on this PR.  Needs a test written though.I don't think there is any need to wait for#3493 imo.  I'll deal with it if this is merged before#3493.Are there any PHP ini settings for this for this driver or is everything via the `session.save_path` directive? (A quick look at the C code seems to indicate there are no explicit ini directives).---------------------------------------------------------------------------by lstrojny at 2012-03-05T12:14:34Z@pulzarraider I don’t necessarily disagree with the usage of phpredis, I just wanted to bring up the issues of various clients and people having different preferences about them.---------------------------------------------------------------------------by fabpot at 2012-03-05T14:46:22Z@pulzarraider Can you add some unit tests before I merge?---------------------------------------------------------------------------by pulzarraider at 2012-03-11T20:19:57Z@Drak No there are no php.ini settings. Only RedisArray has some, but it's another feature.@fabpot I've added simple test based on other session storage tests.I planned to create a RedisSessionStorage, too, but I have no time for it now. This can be added later in another PR as it's independent from NativeRedisSessionStorage.---------------------------------------------------------------------------by drak at 2012-03-12T02:21:25ZThe code looks OK to me.---------------------------------------------------------------------------by fabpot at 2012-03-15T06:05:27Z#3493 has been merged now.---------------------------------------------------------------------------by pulzarraider at 2012-03-16T23:21:27ZCode updated.
@fabpotfabpot merged commitc4ee947 intosymfony:masterMar 23, 2012
@mrbase
Copy link
Contributor

is it just me or is the handler not merged and available ?

@ghost
Copy link

These were removed. You can find themhere

@mrbase
Copy link
Contributor

thanks@Drak

nicolas-grekas added a commit that referenced this pull requestFeb 4, 2018
This PR was merged into the 4.1-dev branch.Discussion----------[HttpFoundation] RedisSessionHandler| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#24433,#18233,#14539,#4538,#3498| License       | MIT| Doc PR        |symfony/symfony-docs#8572Ability to use Redis as a session storage backend. Discussed in detail in linked issues / PRs.Commits-------8776cce [HttpFoundation] Add RedisSessionHandler
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@pulzarraider@lstrojny@lsmith77@fabpot@mrbase

[8]ページ先頭

©2009-2025 Movatter.jp