8000 [HttpFoundation] Redis session handler by sgrodzicki · Pull Request #14539 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[HttpFoundation] Redis session handler #14539

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

Closed
wants to merge 1 commit into from
Closed

[HttpFoundation] Redis session handler #14539

wants to merge 1 commit into from

Conversation

sgrodzicki
Copy link
Contributor
Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR symfony/symfony-docs#5230

@cordoval
Copy link
Contributor
cordoval commented May 5, 2015

I hope this gets in on 2.7 though it has been feature freezed 😟

@Tobion
Copy link
Contributor
Tobion commented May 5, 2015

I'm pretty sure there already exists a redis session handler, even as PHP C extension.

@sgrodzicki
Copy link
Contributor Author

@Tobion please have a closer look. This is just a wrapper which internally uses the C extension. You can set the session handler on a PHP configuration level but often it is more convenient to place it right into your app. That's why all other handlers were created in the first place.

@Tobion
Copy link
Contributor
Tobion commented May 5, 2015

@sgrodzicki I had a close lock and I don't see the point of it.

  1. it's not compatible with the core redis session handler, as it for example uses a different prefix by default. so you cannot easily exchange them
  2. it has less features then the existing one
  3. it doesn't seem to lazy connect to redis
  4. it doesn't close the connection

So what's the advantage?

@jakzal
Copy link
Contributor
jakzal commented Jun 1, 2015

You can set the session handler on a PHP configuration level but often it is more convenient to place it right into your app

When do you think it's more convenient to use a custom handler, instead of the native one?

@sgrodzicki
Copy link
Contributor Author

@jakzal when you don't have access to the PHP configuration file and/or you're hosting multiple Symfony projects on the same server/workers.

@Tobion
Copy link
Contributor
Tobion commented Jun 1, 2015

@sgrodzicki you can set the native handler in code with ini_set. You don't need access to the config file.

@sgrodzicki
Copy link
Contributor Author

@Tobion how is that different from Memcached/MongoDB?

@fabpot
Copy link
Member
fabpot commented Sep 14, 2015

Closing for the reasons given by @Tobion

@fabpot fabpot closed this Sep 14, 2015
nicolas-grekas added a commit that referenced this pull request Feb 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#8572

Ability to use Redis as a session storage backend. Discussed in detail in linked issues / PRs.

Commits
-------

8776cce [HttpFoundation] Add RedisSessionHandler
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.

7 participants
0