Skip to content

Instantly share code, notes, and snippets.

@wozzup
Forked from K-Phoen/config.yml
Created August 1, 2014 06:57
Show Gist options
  • Save wozzup/bb052ae3a1ebee3151d9 to your computer and use it in GitHub Desktop.
Save wozzup/bb052ae3a1ebee3151d9 to your computer and use it in GitHub Desktop.
imports:
# ....
- { resource: services/session.yml }
framework:
# ....
session:
handler_id: session.handler.memcached
aptitude install memcached php5-memcached
parameters:
# ...
session_memcached_host: localhost
session_memcached_port: 11211
session_memcached_prefix: sess
session_memcached_expire: 3600
services:
session.memcached:
class: Memcached
arguments:
persistent_id: %session_memcached_prefix%
calls:
- [ addServer, [ %session_memcached_host%, %session_memcached_port% ]]
session.handler.memcached:
class: Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcachedSessionHandler
arguments: [@session.memcached, { prefix: %session_memcached_prefix%, expiretime: %session_memcached_expire% }]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment