Leaseweb / LswMemcacheBundle

Symfony bundle for Memcache Doctrine caching and session storage in the Web Debug Toolbar.
MIT License
202 stars 57 forks source link

Different Memcache Servers on different environments #57

Closed cbergau closed 9 years ago

cbergau commented 9 years ago

Hello,

I am having a problem with your Bundle. When executing my functional tests, i have an environment "test" which includes config_test.yml. That contains:

lsw_memcache:
    pools:
        default:
            servers:
                - { host: localhost, tcp_port: 11211, weight: 100 }
                - { host: localhost, tcp_port: 11211, weight: 50 }

It works totally fine on my local dev machine. What i now need is a different configuration for my CI-Server. The CI-Server has another memcache host and port. But how can i change parameters for local test execution and CI-Server test execution? The thing is, both uses the environment "test".

mevdschee commented 9 years ago

Why is this a problem? Is the config file part of your code? Maybe you should add it to .gitignore

cbergau commented 9 years ago

No the problem is this: My Config should look like this:

Application Environment "test" running on dev machine: memcache servers: localhost:11211 Application Environment "test" running on ci machine: memcache servers: someotherip:11217

I don't see a way to configure this right with my config yamls.

mevdschee commented 9 years ago

I suggest you read this on how to setup an extra environment. Hope that helps.