Skip to content

Instantly share code, notes, and snippets.

@dlsniper
Created March 18, 2012 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dlsniper/2081365 to your computer and use it in GitHub Desktop.
Save dlsniper/2081365 to your computer and use it in GitHub Desktop.
Sample Doctrine2 cache in Symfony2
# Doctrine Configuration
doctrine:
dbal:
default_connection: connection1
connections:
connection1:
dbname: database1
connection2:
dbname: database2
connection3:
dbname: database3
orm:
default_entity_manager: em1
entity_managers:
em1:
mappings:
AcmeDemoBundle: ~
metadata_cache_driver:
type: memcached
host: localhost
port: 11111
query_cache_driver:
type: memcached
host: localhost
port: 11112
result_cache_driver:
type: memcached
host: localhost
port: 11113
connection: connection1
em2:
mappings:
AcmeDemo2Bundle: ~
metadata_cache_driver:
type: memcached
host: localhost
port: 11111
query_cache_driver:
type: memcached
host: localhost
port: 11112
result_cache_driver:
type: memcached
host: localhost
port: 11113
connection: connection2
em3:
mappings:
AcmeDemo3Bundle: ~
metadata_cache_driver:
type: memcached
host: localhost
port: 11311
query_cache_driver:
type: memcached
host: localhost
port: 11312
result_cache_driver:
type: memcached
host: localhost
port: 11313
connection: connection3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment