<!-- 
RSS generated by JIRA (4.4#649-r158309) at Sun May 19 21:32:03 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/CCACHE-23/CCACHE-23.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>[CCACHE-23] Overwriting entries in LRU-cache deletes LRU key-values unnecessarily</title>
                <link>http://dev.clojure.org/jira/browse/CCACHE-23</link>
                <project id="10171" key="CCACHE">core.cache</project>
                        <description>&lt;p&gt;To &quot;overwrite&quot; the value in an LRUCache, one uses assoc. Surprisingly, another k,v entry is evicted, even though the total number of items in the cache should not be increased by overwriting.&lt;/p&gt;


&lt;p&gt;Demo:&lt;/p&gt;

&lt;p&gt;(def C0 (lru-cache-factory {} :threshold 3))&lt;br/&gt;
; --&amp;gt; #&amp;lt;Var@7ec74910: {}&amp;gt;&lt;/p&gt;

&lt;p&gt;(def C1 (-&amp;gt; C0 (assoc :a 1) (assoc :b 2) (assoc :c 3)))&lt;br/&gt;
; --&amp;gt; #&amp;lt;Var@315863e4: {:c 3, :b 2, :a 1}&amp;gt;&lt;/p&gt;

&lt;p&gt;(-&amp;gt; C1 (assoc :a 4) (assoc :a 5) (assoc :a 6))&lt;br/&gt;
; --&amp;gt; {:a 6}&lt;/p&gt;</description>
                <environment></environment>
            <key id="15548">CCACHE-23</key>
            <summary>Overwriting entries in LRU-cache deletes LRU key-values unnecessarily</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="fogus">Fogus</assignee>
                                <reporter username="arthuredelstein">Arthur Edelstein</reporter>
                        <labels>
                    </labels>
                <created>Fri, 22 Jun 2012 12:22:20 -0500</created>
                <updated>Wed, 22 Aug 2012 19:28:53 -0500</updated>
                    <resolved>Fri, 13 Jul 2012 10:46:13 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="28977" author="fogus" created="Thu, 12 Jul 2012 06:40:56 -0500"  >&lt;p&gt;I&apos;ve pushed a commit to master that I believe fixes this problem. I&apos;ll look at it a bit more and will release a v0.6.1 version ASAP.&lt;br/&gt;
Thank you&lt;/p&gt;</comment>
                    <comment id="28982" author="fogus" created="Thu, 12 Jul 2012 15:24:10 -0500"  >&lt;p&gt;version 0.6.1 has been pushed out to Maven central.&lt;/p&gt;</comment>
                    <comment id="28985" author="fogus" created="Fri, 13 Jul 2012 10:46:13 -0500"  >&lt;p&gt;v0.6.1 pushed to Maven Central.&lt;/p&gt;</comment>
                    <comment id="28988" author="siyu" created="Mon, 16 Jul 2012 13:30:51 -0500"  >&lt;p&gt;It appears v0.6.1 still has not fixed the issue&lt;/p&gt;

&lt;p&gt;(-&amp;gt; (cache/lru-cache-factory {} :threshold 2)&lt;br/&gt;
          (assoc :a 1)&lt;br/&gt;
          (assoc :b 2)&lt;br/&gt;
          (assoc :b 3))&lt;br/&gt;
{:b 3}&lt;/p&gt;</comment>
                    <comment id="29255" author="arthuredelstein" created="Wed, 22 Aug 2012 19:28:53 -0500"  >&lt;p&gt;Works for me in 0.6.2. Thanks, Fogus!&lt;/p&gt;


&lt;p&gt;(-&amp;gt; (cache/lru-cache-factory {} :threshold 2)&lt;br/&gt;
  (assoc :a 1)&lt;br/&gt;
  (assoc :b 2)&lt;br/&gt;
  (assoc :b 3))&lt;/p&gt;

&lt;p&gt;; {:b 3, :a 1}&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>
</channel>
</rss>