[Building Sakai] Don't use CacheRefresher and remove it from your code as soon as is convenient

Aaron Zeckoski azeckoski at unicon.net
Thu Apr 10 11:39:37 PDT 2014


On the core team call today the team decided that we will not fix the
bug mentioned with CacheRefresher since it has been around for a long
time and at this point it will change current behavior to fix it. The
bug is that it is never called so anyone implementing the
CacheRefresher listener will not have their code executed.

If you are using it or planning to use it in a tool (core or
otherwise) you should probably remove it as soon as possible. It is
deprecated now and will be removed in the future (likely for Sakai
11). I listed the places where I found it was being used below.

This is implemented in at least these:
BaseAssignmentService.java
BaseCalendarService.java
BaseContentService.java
BaseNotificationService.java
BaseMessageService.java

And referenced (but not implemented) in these (mostly LB):
NotificationCache.java
Assignment2Export.java
MnemeEntity.java
AssignmentExport.java
ForumsExport.java
JForumExport.java
SamigoExport.java
AssignmentEntity.java
BltiEntity.java
ForumEntity.java
SamigoEntity.java
LessonsGradeInfoProvider.java
providers/jldap/src/test/edu/amc/sakai/user/TestMemoryService.java
sitestats/test/mocks/FakeMemoryService.java

-AZ


On Thu, Apr 10, 2014 at 8:13 AM, Aaron Zeckoski <azeckoski at unicon.net> wrote:
> I found what looks like a blocker related to caching. Please have a
> look and comment on the ticket.
>
> https://jira.sakaiproject.org/browse/KNL-1226
>
> I am including a definition below in case you need it.
>
> CACHE LOADER (CacheRefresher):
> This is simply a cache miss loader (also known as a blocking cache
> listener or cache warmer). This defines a kind of listener method
> which will be called whenever a cache miss occurs. In other words, if
> the cache is asked to retrieve an object by a key which does not exist
> in the cache then this method will be called if defined for that
> cache. Then the returned value will be returned from the lookup (or a
> null if no new value was found) and
> also inserted into the cache (unless the value was null).
> Similar to https://github.com/jsr107/jsr107spec/blob/master/src/main/java/javax/cache/integration/CacheLoader.java
> from the JSR-107 specification.
> See KNL-1226 but this functionality is broken in Sakai trunk and 2.9 (at least)
>
> -AZ
>
>
> --
> Aaron Zeckoski - Software Architect - http://tinyurl.com/azprofile



-- 
Aaron Zeckoski - Software Architect - http://tinyurl.com/azprofile


More information about the sakai-dev mailing list