<!-- 
RSS generated by JIRA (4.4#649-r158309) at Mon May 20 22:20:55 CDT 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://dev.clojure.org/jira/si/jira.issueviews:issue-xml/CMEMOIZE-3/CMEMOIZE-3.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Clojure JIRA</title>
    <link>http://dev.clojure.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>4.4</version>
        <build-number>649</build-number>
        <build-date>25-07-2011</build-date>
    </build-info>

<item>
            <title>[CMEMOIZE-3] snapshot assumes too much about a CacheProtocol implementation</title>
                <link>http://dev.clojure.org/jira/browse/CMEMOIZE-3</link>
                <project id="10172" key="CMEMOIZE">core.memoize</project>
                        <description>&lt;p&gt;I believe this line &lt;a href=&quot;https://github.com/clojure/core.memoize/blob/9bdf608af8bbf4a753fc19758446dd821cb45979/src/main/clojure/clojure/core/memoize.clj#L72&quot;&gt;https://github.com/clojure/core.memoize/blob/9bdf608af8bbf4a753fc19758446dd821cb45979/src/main/clojure/clojure/core/memoize.clj#L72&lt;/a&gt; assumes too much about implementations of CacheProtocol, namely that they have a field named &apos;cache&apos;.&lt;/p&gt;

&lt;p&gt;The first call to .cache makes sense, since PluggableMemoization has a &apos;cache&apos; field, but the second call to .cache assumes that any implementation of CacheProtocol that PluggableMemoization wraps will have a &apos;cache&apos; field.&lt;/p&gt;

&lt;p&gt;I ran into this issue when I desired to have a cache that ignores nils, so I attempted to wrap the TTLCache with an implementation of CacheProtocol that would not cache nil values.  Calls to snapshot failed since it was trying to access a &apos;cache&apos; field on my NoNilCache.&lt;/p&gt;

&lt;p&gt;I suspect that the outer call to .cache could be replaced with a call to seq, since defcache adds an implementation of seq to each cache implementation which should pull out the keys/values from the cache.&lt;/p&gt;

&lt;p&gt;I&apos;d be glad to work up a patch given that I&apos;m not off base in my assumptions.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15067">CMEMOIZE-3</key>
            <summary>snapshot assumes too much about a CacheProtocol implementation</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="pjstadig">Paul Stadig</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Dec 2011 14:36:36 -0600</created>
                <updated>Wed, 14 Dec 2011 07:29:00 -0600</updated>
                    <resolved>Wed, 14 Dec 2011 07:29:00 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27463" author="fogus" created="Tue, 13 Dec 2011 15:08:58 -0600"  >&lt;p&gt;@Paul&lt;/p&gt;

&lt;p&gt;The better assumption is that the underlying caches are associative.  Thanks for reporting and a patch would be wonderful.&lt;/p&gt;</comment>
                    <comment id="27464" author="pjstadig" created="Tue, 13 Dec 2011 16:16:41 -0600"  >&lt;p&gt;Added test and removed one layer of calls to .cache.  I tested this against my code base, and it fixes the issue I was seeing.&lt;/p&gt;</comment>
                    <comment id="27465" author="pjstadig" created="Tue, 13 Dec 2011 16:28:57 -0600"  >&lt;p&gt;Updated patch.  The tests worked before by throwing an exception on failure, but I updated it by adding an is assertion.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10743" name="3-fix-snapshot-assumptions.diff" size="2500" author="pjstadig" created="Tue, 13 Dec 2011 16:16:41 -0600" />
                    <attachment id="10744" name="3-fix-snapshot-assumptions-updated.diff" size="2512" author="pjstadig" created="Tue, 13 Dec 2011 16:28:57 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10005">Accepted</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>
</channel>
</rss>