resource.manager.defaultcache.size of 89 - any reason why?

View: New views
5 Messages — Rating Filter:   Alert me  

resource.manager.defaultcache.size of 89 - any reason why?

by Matt Brown :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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?

Thanks


Re: resource.manager.defaultcache.size of 89 - any reason why?

by Nathan Bubna :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I wasn't around for that, but i always imagined it was arbitrary.
It's really the kind of thing that you should tune yourself, but some
value was needed as the default.

On Mon, May 11, 2009 at 12:50 PM, Matt Brown
<Matt.Brown@...> wrote:
> 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?
>
> Thanks
>
>

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


Re: resource.manager.defaultcache.size of 89 - any reason why?

by Antonio Petrelli-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/5/11 Matt Brown <Matt.Brown@...>:
> 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@...
For additional commands, e-mail: user-help@...


Re: resource.manager.defaultcache.size of 89 - any reason why?

by wglass :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...> wrote:

> 2009/5/11 Matt Brown <Matt.Brown@...>:
>> 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@...
> For additional commands, e-mail: user-help@...
>
>

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


RE: resource.manager.defaultcache.size of 89 - any reason why?

by Matt Brown :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks all. I figured it had something to do with prime/hashing but was just curious if that was correct :)

-----Original Message-----
From: Will Glass-Husain [mailto:wglasshusain@...]
Sent: Monday, May 11, 2009 6:02 PM
To: Velocity Users List
Subject: Re: resource.manager.defaultcache.size of 89 - any reason why?

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@...> wrote:

> 2009/5/11 Matt Brown <Matt.Brown@...>:
>> 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@...
> For additional commands, e-mail: user-help@...
>
>

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


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