velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Will Glass-Husain <wglasshus...@gmail.com>
Subject Re: resource.manager.defaultcache.size of 89 - any reason why?
Date Mon, 11 May 2009 22:02:18 GMT
I remember Dan Rall saying at the time it was because it was prime.

WILL

On Mon, May 11, 2009 at 2:19 PM, Antonio Petrelli
<antonio.petrelli@gmail.com> wrote:
> 2009/5/11 Matt Brown <Matt.Brown@citrixonline.com>:
>> When resource caching is enabled in Velocity, and the default cache (ResourceCacheImpl)
is used, the default size of the LRU cache used (if not otherwise set) is 89.
>>
>> Just curious - anyone know how/why the value of 89 was chosen?
>
> IMHO, it could be that 89 is a prime number, and it is a good number
> when doing division-based hashes.
> http://en.wikipedia.org/wiki/Hash_function#Variable_range
>
> However, I cannot tell why 89 and not another prime number.
>
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Mime
View raw message