-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Fixing the Cache Storage Factory Adapter Factory #2719
Fixing the Cache Storage Factory Adapter Factory #2719
Conversation
…ction or else adapters like Memcached will not properly set servers. Memcached adapter only sets servers in the constructor so they cannot be added after.
Sorry - I couldn't figure a way to add a test. The only thing I know for sure affected by this is Memcached. It MUST have servers passed in via constructor $options: https://github.com/zendframework/zf2/blob/master/library/Zend/Cache/Storage/Adapter/Memcached.php#L86 |
Damn you are right but the |
@marc-mabe and @SocalNick -- perhaps we need a default AbstractFactory attached that handles all but the Memcached adapter; that factory would then instantiate and call setOptions() with the passed options. Thoughts? |
@weierophinney In my mind the |
All the Storage Adapters extend AbstractAdapter, which implements public If the servers can be changed with setOptions, maybe we should lazily -Nick Nicholas Calugar On Wed, Oct 10, 2012 at 10:14 AM, Marc Bennewitz
|
@SocalNick I don't think it's a good idea defining any of the magic methods into interfaces |
Can we decide on a way to proceed? I'd really like to see this fixed in Nicholas Calugar On Wed, Oct 10, 2012 at 1:06 PM, Marc Bennewitz [email protected]:
|
@SocalNick: I'll process on Monday fixing the memcached adapter |
Should be fixed by #2770 |
@SocalNick I believe this is now no longer necessary, as the Memcached resource is now only instantiated on first use. |
Yes - thx for getting this fixed in #2770!! |
@marc-mabe
If $options is set, it should be passed to the plugin manager get function or else adapters like Memcached will not properly set servers. Memcached adapter only sets servers in the constructor so they cannot be added after.