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
19 changes: 11 additions & 8 deletions src/dev_process_cache.erl
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,17 @@ path(ProcID, Ref, PathSuffix, Opts) ->
latest(ProcID, Opts) -> latest(ProcID, [], Opts).
latest(ProcID, RequiredPath, Opts) ->
latest(ProcID, RequiredPath, undefined, Opts).
latest(ProcID, RawRequiredPath, Limit, Opts) ->
?event(
{latest_called,
{proc_id, ProcID},
{required_path, RawRequiredPath},
{limit, Limit}
}
),
latest(ProcID, RawRequiredPath, Limit, RawOpts) ->
Scope = hb_opts:get(process_cache_scope, local, RawOpts),
% Normalize the store descriptor to a list of stores.
UnscopedStore =
case hb_opts:get(store, no_viable_store, RawOpts) of
StoreMsg when is_map(StoreMsg) -> [StoreMsg];
Other -> Other
end,
% Apply the scope to the store and update the options message.
ScopedStore = hb_store:scope(UnscopedStore, Scope),
Opts = RawOpts#{ store => ScopedStore },
% Convert the required path to a list of _binary_ keys.
RequiredPath =
case RawRequiredPath of
Expand Down
Loading