[Building Sakai] specifying a cache size

Matthew Jones jonespm at umich.edu
Sun Jun 13 16:35:21 PDT 2010


I'm sure that the values I specify in the bean and properties are adjusting
the cache. I have verified it visually on the Admin->Memory->Status page
(which also dumps to the log file) with the defaults and with a property. We
have also verified them with load tests and they do show significant
differences with higher values. This is on 2.6 though, so I haven't compared
the code verses trunk.

-Matthew

On Sun, Jun 13, 2010 at 5:31 PM, Steve Swinsburg
<steve.swinsburg at gmail.com>wrote:

> So the code we were looking at in MemoryService that loads the cache if it
> already exists in the bean config seems to be commented out.
>
>
> https://source.sakaiproject.org/svn//kernel/trunk/kernel-impl/src/main/java/org/sakaiproject/memory/impl/BasicMemoryService.java
>
> see instantiateCache.
>
> Are you sure the values you specify are actually getting in there, if you
> look at the Memory tool? If so, I'll adjust my config to use Spring defined
> cache.
>
> cheers,
> Steve
>
>
>
>
> On 13 Jun 2010, at 17:21, Matthew Jones wrote:
>
> ehcache settings exposed as spring beans are configurable. You can use that
> name passed to newCache to change the default values either in
> components.xml or at runtime with the @ syntax as described in.
>
> http://jira.sakaiproject.org/browse/SAK-14120
>
> As far as adjusting a cache not connected to a bean, I'm not sure. When I
> modified the caching for our local provider, I just added a bean for it and
> it was really easy to adjust.
>
> See this change:
>
> https://source.sakaiproject.org/viewsvn?view=revision&revision=68195
>
> + m_callCache = m_memory.newCache("org.sakaiproject.util.impl.umiac");
>
> -Matthew
>
>
> On Sun, Jun 13, 2010 at 5:04 PM, Steve Swinsburg <
> steve.swinsburg at gmail.com> wrote:
>
>> Hi all,
>>
>> Aaron and I were chatting this eve about caching in Sakai and realised
>> that the ability to allow a user to set the cache size and time when getting
>> a new cache, seem to have been removed/adjusted?
>>
>> So a call to MemoryService.newCache(String cacheName) creates a new cache
>> with the default settings from ehcache.xml, and it's only 5 minutes long
>> (300 seconds).
>>
>> Does anyone know if its possible to override this somehow?
>>
>> thanks,
>> Steve
>> _______________________________________________
>> sakai-dev mailing list
>> sakai-dev at collab.sakaiproject.org
>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>
>> TO UNSUBSCRIBE: send email to
>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>> "unsubscribe"
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20100613/41777489/attachment.html 


More information about the sakai-dev mailing list