caching fixes

This commit is contained in:
anhefti 2021-05-18 09:24:28 +02:00
parent 2809acc432
commit c411fe5e7e
2 changed files with 7 additions and 1 deletions

View file

@ -46,6 +46,10 @@ public abstract class AbstractCachedCourseAccess extends AbstractCourseAccess {
/** Used to clear the entire cache */
public void clearCache() {
final Object nativeCache = this.cache.getNativeCache();
// if (nativeCache instanceof Eh107Cache) {
//
// }
this.cache.clear();
}

View file

@ -92,7 +92,9 @@ public class LmsAPIServiceImpl implements LmsAPIService {
log.debug("LmsSetup changed. Update cache by removing eventually used references");
}
this.cache.remove(new CacheKey(lmsSetup.getModelId(), 0));
final LmsAPITemplate removedTemplate = this.cache
.remove(new CacheKey(lmsSetup.getModelId(), 0));
removedTemplate.clearCache();
}
@Override