fixed cache issue
do not evict the cache before get exams for institution otherwise connecting SEB clients will always reload all running exams form institution
This commit is contained in:
		
							parent
							
								
									3a06f9937f
								
							
						
					
					
						commit
						8daf39a177
					
				
					 1 changed files with 0 additions and 2 deletions
				
			
		|  | @ -250,10 +250,8 @@ public class ExamSessionServiceImpl implements ExamSessionService { | ||||||
| 
 | 
 | ||||||
|     @Override |     @Override | ||||||
|     public Result<Collection<Exam>> getRunningExamsForInstitution(final Long institutionId) { |     public Result<Collection<Exam>> getRunningExamsForInstitution(final Long institutionId) { | ||||||
|         // NOTE: we evict the exam from the cache (if present) to ensure user is seeing always the current state of the Exam |  | ||||||
|         return this.examDAO.allIdsOfInstitution(institutionId) |         return this.examDAO.allIdsOfInstitution(institutionId) | ||||||
|                 .map(col -> col.stream() |                 .map(col -> col.stream() | ||||||
|                         .map(this.examSessionCacheService::evict) |  | ||||||
|                         .map(this::getRunningExam) |                         .map(this::getRunningExam) | ||||||
|                         .filter(Result::hasValue) |                         .filter(Result::hasValue) | ||||||
|                         .map(Result::get) |                         .map(Result::get) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 anhefti
						anhefti