Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/org/labkey/targetedms/TargetedMSManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
import org.labkey.api.targetedms.TargetedMSService;
import org.labkey.api.targetedms.model.SampleFileInfo;
import org.labkey.api.util.FileUtil;
import org.labkey.api.util.GUID;
import org.labkey.api.util.StringUtilsLabKey;
import org.labkey.api.util.logging.LogHelper;
import org.labkey.api.view.NotFoundException;
Expand Down Expand Up @@ -164,7 +165,7 @@ private TargetedMSManager()
* A cache to make it faster to render QC folders. A number of API calls come from the
* client rendering the overview, all of which need to know the enabled configs.
*/
private static final Cache<Container, List<QCMetricConfiguration>> _metricCache = CacheManager.getBlockingCache(1000, TimeUnit.HOURS.toMillis(1), "Enabled QC metric configs",
private static final Cache<GUID, List<QCMetricConfiguration>> _metricCache = CacheManager.getBlockingCache(1000, TimeUnit.HOURS.toMillis(1), "Enabled QC metric configs",
(_, argument) ->
{
if (!(argument instanceof TargetedMSSchema schema))
Expand Down Expand Up @@ -2437,7 +2438,7 @@ private static Double getValue(Object o)

public static List<QCMetricConfiguration> getAllQCMetricConfigurations(TargetedMSSchema schema)
{
return _metricCache.get(schema.getContainer(), schema, null);
return _metricCache.get(schema.getContainer().getEntityId(), schema, null);
}
public static List<QCMetricConfiguration> getEnabledQCMetricConfigurations(TargetedMSSchema schema)
{
Expand Down Expand Up @@ -3065,7 +3066,7 @@ public static Map<String,Object> getQCFolderDateRange(Container container)
*/
public void clearQCMetricCache(Container container, boolean clearMetricValues)
{
getSchema().getScope().addCommitTask(() -> _metricCache.remove(container), DbScope.CommitTaskOption.IMMEDIATE, DbScope.CommitTaskOption.POSTCOMMIT, DbScope.CommitTaskOption.POSTROLLBACK);
getSchema().getScope().addCommitTask(() -> _metricCache.remove(container.getEntityId()), DbScope.CommitTaskOption.IMMEDIATE, DbScope.CommitTaskOption.POSTCOMMIT, DbScope.CommitTaskOption.POSTROLLBACK);

if (clearMetricValues)
{
Expand Down
Loading