[ 
https://issues.apache.org/jira/browse/WHIMSY-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16662859#comment-16662859
 ] 

Sebb commented on WHIMSY-217:
-----------------------------

For example, the following code currently returns the values shown as comments:
{code}
def count
  n=0
  ASF::ICLA.each {|i| n=n+1}
  puts n
end
count # 10200
ASF::ICLA.find_by_name('xx')
count # 10165
ASF::ICLA.find_by_email('xx')
count # 10165
ASF::ICLA.find_by_id('xx')
count # 6540
{code}

> asf/icla.rb caching is inconsistent
> -----------------------------------
>
>                 Key: WHIMSY-217
>                 URL: https://issues.apache.org/jira/browse/WHIMSY-217
>             Project: Whimsy
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Major
>
> The icla.rb library routine does not cache the original entries from 
> iclas.txt.
> Instead it caches the ids, names and emails.
> However the each() method uses the first of these it finds; this means that 
> any duplicates are lost; in particular any reference to find_by_id drops all 
> notinavail entries.
> It's OK to use the caches for the find_by methods, but not for each.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to