diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/AbstractCachedCourseAccess.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/AbstractCachedCourseAccess.java index f9eb1431..90d57739 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/AbstractCachedCourseAccess.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/AbstractCachedCourseAccess.java @@ -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(); } diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/LmsAPIServiceImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/LmsAPIServiceImpl.java index f5a06fe4..7bd23c89 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/LmsAPIServiceImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/LmsAPIServiceImpl.java @@ -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