When a user log in several times dataCollections and investigations are retrieved
Reported by @kphipps
In the logs we see that this appears twice
Retrieved 26 datacollections from ICAT by sessionId.
Complete log:
020-04-03T05:44:17.721Z [debug]: Init cache for userreader
2020-04-03T05:44:17.722Z [info]: Init cache for user
sessionId : fcd6f016-5a62-4092-bb2d-c0b41226ab75
username : reader
2020-04-03T05:44:17.906Z [info]: getSessionInformation succeed
sessionId : fcd6f016-5a62-4092-bb2d-c0b41226ab75
username : reader
2020-04-03T05:44:17.907Z [info]: Init cache for user
sessionId : fcd6f016-5a62-4092-bb2d-c0b41226ab75
username : null
2020-04-03T05:44:17.907Z [info]: {} => cache
sessionId : fcd6f016-5a62-4092-bb2d-c0b41226ab75
2020-04-03T05:44:17.907Z [info]: username => cache
sessionId : fcd6f016-5a62-4092-bb2d-c0b41226ab75
key : username
2020-04-03T05:44:17.908Z [info]: [cache] Username is set
sessionId : fcd6f016-5a62-4092-bb2d-c0b41226ab75
username : reader
isAdministrator : false
2020-04-03T05:44:17.908Z [debug]: [cache] Retrieving datacollections by sessionId
sessionId : fcd6f016-5a62-4092-bb2d-c0b41226ab75
2020-04-03T05:44:17.908Z [debug]: https://localhost:8181/icat/entityManager?sessionId=fcd6f016-5a62-4092-bb2d-c0b41226ab75&query=SELECT distinct(dc) from DataCollection dc JOIN dc.dataCollectionDatasets dcds JOIN dcds.dataset ds where dc.doi is not null include dc.parameters p, p.type, dc.dataCollectionDatasets dcds, dcds.dataset&server=https://localhost:8181
method : getDataColletionsBySessionId
2020-04-03T05:44:17.909Z [debug]: [cache] Retrieving investigations by sessionId
sessionId : fcd6f016-5a62-4092-bb2d-c0b41226ab75
2020-04-03T05:44:17.913Z [debug]: getInvestigationsBySessionId
query : https://localhost:8181/icat/entityManager?sessionId=fcd6f016-5a62-4092-bb2d-c0b41226ab75&query=select distinct investigation from Investigation investigation , investigation.investigationUsers as investigationUserPivot , investigationUserPivot.user as investigationUser where investigationUser.name = 'reader' order by investigation.startDate DESC include investigation.investigationInstruments investigationInstruments, investigationInstruments.instrument instrument, investigation.parameters p, p.type&server=https://localhost:8181
2020-04-03T05:44:18.147Z [info]: getSessionInformation succeed
sessionId : fcd6f016-5a62-4092-bb2d-c0b41226ab75
username : reader
2020-04-03T05:44:18.147Z [info]: username => cache
sessionId : fcd6f016-5a62-4092-bb2d-c0b41226ab75
key : username
2020-04-03T05:44:18.147Z [info]: [cache] Username is set
sessionId : fcd6f016-5a62-4092-bb2d-c0b41226ab75
username : null
isAdministrator : false
2020-04-03T05:44:18.148Z [debug]: [cache] Retrieving datacollections by sessionId
sessionId : fcd6f016-5a62-4092-bb2d-c0b41226ab75
2020-04-03T05:44:18.149Z [debug]: https://localhost:8181/icat/entityManager?sessionId=fcd6f016-5a62-4092-bb2d-c0b41226ab75&query=SELECT distinct(dc) from DataCollection dc JOIN dc.dataCollectionDatasets dcds JOIN dcds.dataset ds where dc.doi is not null include dc.parameters p, p.type, dc.dataCollectionDatasets dcds, dcds.dataset&server=https://localhost:8181
method : getDataColletionsBySessionId
2020-04-03T05:44:18.150Z [debug]: [cache] Retrieving investigations by sessionId
sessionId : fcd6f016-5a62-4092-bb2d-c0b41226ab75
2020-04-03T05:44:18.150Z [debug]: getInvestigationsBySessionId
query : https://localhost:8181/icat/entityManager?sessionId=fcd6f016-5a62-4092-bb2d-c0b41226ab75&query=select distinct investigation from Investigation investigation , investigation.investigationUsers as investigationUserPivot , investigationUserPivot.user as investigationUser where investigationUser.name = 'reader' order by investigation.startDate DESC include investigation.investigationInstruments investigationInstruments, investigationInstruments.instrument instrument, investigation.parameters p, p.type&server=https://localhost:8181
2020-04-03T05:44:18.203Z [debug]: [cache] Retrieved 4 investigations from ICAT by sessionId.
sessionId : fcd6f016-5a62-4092-bb2d-c0b41226ab75
username : reader
2020-04-03T05:44:18.205Z [info]: myInvestigations => cache
sessionId : fcd6f016-5a62-4092-bb2d-c0b41226ab75
key : myInvestigations
2020-04-03T05:44:18.481Z [debug]: [cache] Retrieved 26 datacollections from ICAT by sessionId.
sessionId : fcd6f016-5a62-4092-bb2d-c0b41226ab75
username : reader
2020-04-03T05:44:18.482Z [info]: datacollections => cache
sessionId : fcd6f016-5a62-4092-bb2d-c0b41226ab75
key : datacollections
2020-04-03T05:44:18.597Z [debug]: [cache] Retrieved 4 investigations from ICAT by sessionId.
sessionId : fcd6f016-5a62-4092-bb2d-c0b41226ab75
username : null
2020-04-03T05:44:18.602Z [info]: myInvestigations => cache
sessionId : fcd6f016-5a62-4092-bb2d-c0b41226ab75
key : myInvestigations
2020-04-03T05:44:18.604Z [info]: Force initSession for user
2020-04-03T05:44:18.842Z [debug]: [cache] Retrieved 26 datacollections from ICAT by sessionId.
sessionId : fcd6f016-5a62-4092-bb2d-c0b41226ab75
username : null
2020-04-03T05:44:18.845Z [info]: datacollections => cache
sessionId : fcd6f016-5a62-4092-bb2d-c0b41226ab75
key : datacollections