On 29.05.2009, at 10:11, HASH wrote:

Hello

Hi there,


I would like to know how best to enable a Doctrine Memcache driver at the manager level. I have tried to use the manager_attributes parameters in the
databases.xml to setup the attributes on the Doctrine manager but came
across two issues.

Firstly, Doctrine::ATTR_RESULT_CACHE should be used as the name of the
attribute. This can be worked around by using the integer value in place of
this name.

You can simply use attribute names (and values), for instance:
<ae:parameter name="attributes">
  <ae:parameter name="PORTABILITY">NONE</ae:parameter>
</ae:parameter>

That will set ATTR_PORTABILITY to PORTABILITY_NONE.


Secondly, the value should be a cache driver object. This can be
instantiated with
'new Doctrine_Cache_Memcache($options)'
However this is evaluated as a string and so an exception is thrown. So my
question is if setting up the cache driver in the config files is not
possible at this time, what is the current 'best way' to set this up?

That is a problem indeed. I guess the best way is to subclass AgaviDoctrineDatabase, at least for the moment.

Hope that helps,

- David

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to