dataverse
dataverse copied to clipboard
Metrics caching doesn't handle dataLocation parameter
The dataset related calls in https://github.com/IQSS/dataverse/blob/1dd5fa4717cef2667fa19491d5d2ba778480a472/src/main/java/edu/harvard/iq/dataverse/api/Metrics.java#L193-L313 support a dataLocation parameter to get info for local, remote (harvested), or all datasets. However, the caching doesn't handle the parameter. Thus, whichever call is made first is cached and served as the response regardless of whether the parameter is different the next time. A partial workaround is to clear the cache before making a call.
A fix would involve adding the param value (after sanitizing) to the metricName being cached so that values for all three options are cached separately.
- When does this issue occur? Metrics API
Which version of Dataverse are you using? develop/6.1+