# 1.9 Prime class change request

**URL:** <https://www.ruby-forum.com/t/1-9-prime-class-change-request/117777>\
**Category:** Ruby\
**Created:** [October 20, 2007, 3:40am UTC](https://www.ruby-forum.com/t/1-9-prime-class-change-request/117777 "2007-10-20T03:40:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![C\_Erler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a183cd/32.png) [@C\_Erler](https://www.ruby-forum.com/u/C_Erler)\
**Post date:** [October 20, 2007, 3:40am UTC](https://www.ruby-forum.com/t/1-9-prime-class-change-request/117777/1 "2007-10-20T03:40:57Z")

</div>

In mathn.rb, please remove the method Prime.cache and its aliases,  
since it is an exposed implementation detail. If we later switch to a  
faster algorithm that doesn’t use a cache, backward compatibility  
issues will be avoided.

Those who want to see the cache would still be able to use hackish  
methods to acheive it.

---

<div class="post-metadata">

**Author:** ![C\_Erler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a183cd/32.png) [@C\_Erler](https://www.ruby-forum.com/u/C_Erler)\
**Post date:** [October 21, 2007, 8:08am UTC](https://www.ruby-forum.com/t/1-9-prime-class-change-request/117777/2 "2007-10-21T08:08:26Z")

</div>

On Oct 19, 2007, at 18:39 , C Erler wrote:

> In mathn.rb, please remove the method Prime.cache and its aliases,  
> since it is an exposed implementation detail. If we later switch to a  
> faster algorithm that doesn’t use a cache, backward compatibility  
> issues will be avoided.
> 
> Those who want to see the cache would still be able to use hackish  
> methods to acheive it.

ruby-core is the best place for this kind of discussion.
