CacheRefresher no longer working for any cases (though it could work for MRC)

Description

See https://sakaiproject.atlassian.net/browse/KNL-1162#icft=KNL-1162 for a definition of CacheRefresher
The only place where the CacheRefresher is called when an entry is missing on get() is in the CacheEntry class. This is used by the MultiRefCache (MRC) in GenericMultiRefCacheImpl but NOT by the MemCache impl.

Hilariously, the MRCs cannot even be created with a CacheRefresher specified (as shown by the API).
MultiRefCache newMultiRefCache(String cacheName);
GenericMultiRefCache newGenericMultiRefCache(String cacheName);

Therefore, this functionality does not work in any circumstance which is possible through the Kernel API (and nothing appears to use it directly in kernel except for tests).

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

I'm not sure how long this has been the case but it definitely affects 2.9 and trunk.

Activity

Show:

amberg1 June 8, 2014 at 7:03 AM

rc01 startup
(built from trunk - mvn -Ppack-demo install)

2014-06-08 13:29:42,338 WARN localhost-startStop-1 org.sakaiproject.memory.impl.EhcacheMemoryService - Creating MultiRefCache(org.sakaiproject.authz.api.SecurityService.cache), GenericMultiRefCache is not supported in the distributed MemoryService implementation, the refs handling will do nothing!

Aaron Zeckoski April 10, 2014 at 1:40 PM

We will not be fixing this. I have deprecated it and it will be removed in a future version. Anything that needs similar functionality should use CacheLoader which will be included in Sakai 10. We plan to remove CacheRefresher for Sakai 11.

Won't Fix

Details

Priority

Affects versions

Components

Assignee

Reporter

Created April 10, 2014 at 7:04 AM
Updated April 25, 2018 at 3:18 PM
Resolved April 10, 2014 at 1:40 PM

Flag notifications