<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Thu May 23 20:57:18 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/si/jira.issueviews:issue-xml/DC-963/DC-963.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Doctrine Project</title>
    <link>http://www.doctrine-project.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>5.2.7</version>
        <build-number>850</build-number>
        <build-date>21-02-2013</build-date>
    </build-info>

<item>
            <title>[DC-963] Doctrine cache - Salt dissociation</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-963</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Doctrine Cache store data into a persistence storage.&lt;/p&gt;

&lt;p&gt;Regarding APC, Doctrine use a share storage.&lt;br/&gt;
Doctrine is able to cache SQL from DQL, and DOM from SQL.&lt;br/&gt;
To do this, Doctrine create a DQL hash, and store the SQL result refer to the hash. &lt;/p&gt;

&lt;p&gt;I&apos;m using a server to host two Doctrine project, a preproduction &amp;amp; production Website. In some case, DQL is the same on both project, but the data model definition isn&apos;t.&lt;/p&gt;

&lt;p&gt;Preproduction convert DQL to SQL using data model definition, and store the SQL result into APC cache refer to the DQL hash.&lt;br/&gt;
Production create a DQL hash, this is the same hash as preproduction.. So production instance use the SQL refer to the preproduction.. &lt;/p&gt;

&lt;p&gt;I&apos;m not sure about the quality of this explanation... But I can add some information is needed.&lt;/p&gt;


&lt;p&gt;The solution of this problem is easy. Just add a SALT to any cache id&apos;s. It&apos;s a Doctrine_Cache problem, not only a Doctrine_Cache_APC problem..&lt;br/&gt;
For Query cache it&apos;s not really important because this cache is optional, but for result cache.. It&apos;s more critical.&lt;br/&gt;
The SALT can be define when instantiate the Doctrine_Cache object, it&apos;s just an option..&lt;/p&gt;


&lt;p&gt;$cacheDriver = new doctrine_Cache_Apc ();&lt;br/&gt;
$cacheDriver-&amp;gt;setOption (&quot;salt&quot;, &quot;domain.tld&quot;);&lt;/p&gt;</description>
                <environment></environment>
            <key id="12351">DC-963</key>
            <summary>Doctrine cache - Salt dissociation</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="armetiz">Thomas Tourlourat - Armetiz</reporter>
                        <labels>
                    </labels>
                <created>Thu, 3 Feb 2011 05:05:19 +0000</created>
                <updated>Mon, 18 Apr 2011 10:13:28 +0000</updated>
                                                                    <component>Caching</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="15219" author="armetiz" created="Thu, 3 Feb 2011 05:12:45 +0000"  >&lt;p&gt;to complete this bug, I think it&apos;s also a problem on DC 2..&lt;/p&gt;</comment>
                    <comment id="15737" author="jaikdean" created="Mon, 18 Apr 2011 10:13:28 +0000"  >&lt;p&gt;There is already an (undocumented?) option &quot;prefix&quot; that allows this.&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;$cacheDriver = new Doctrine_Cache_Apc(array(&apos;prefix&apos; =&amp;gt; &apos;MY UNIQUE SALT&apos;));&lt;/tt&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>