HG-557: Add logging of cache hit/miss (#489)

This commit is contained in:
ndiezel0 2020-10-19 16:11:16 +03:00 committed by GitHub
parent 2c2bd465bc
commit a0ba5ff844
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -836,10 +836,12 @@ checkout_history_by_timestamp([], Timestamp, St) ->
checkout_cached_party_by_revision(PartyID, Revision) ->
case pm_party_cache:get_party(PartyID, Revision) of
{ok, Party} ->
_ = logger:info("PartyID: ~p Revision: ~p cache hit", [PartyID, Revision]),
{ok, Party};
not_found ->
case checkout_party_by_revision(PartyID, Revision) of
{ok, Party} = Res ->
_ = logger:info("PartyID: ~p Revision: ~p cache miss", [PartyID, Revision]),
ok = pm_party_cache:update_party(PartyID, Revision, Party),
Res;
OtherRes ->