Implement caching support by interfacing list in inject-links-pid #9

Open
opened 2026-08-27 12:55:48 +00:00 by mih · 0 comments
Owner

This issue replaces #6

The PR description says:

Given that this command normally requests records to be looked up from the Pool by class (not by single PID) it is not obvious what a full implementation of cache should look like (commands which fetch one PID at a time can consult cache first and API only if not cached).

We have a command that does look-up by class. It is list. The difference is that list only consults the cache, and never polls the API.

This is exactly the approach that #6 took, but without (re)using list.

After the major refactoring over the past days, new helpers and patterns have become available that can be used in this context too. One possible pattern would be that of an externally provided "resolver". Such a resolver can either query the cache via list, or it can query the API. The CLI coudl expose a mode switch to select between these alternatives.

This issue replaces https://hub.psychoinformatics.de/orinoco/query-things/pulls/6 The PR description says: > Given that this command normally requests records to be looked up from the Pool by class (not by single PID) it is not obvious what a full implementation of cache should look like (commands which fetch one PID at a time can consult cache first and API only if not cached). We have a command that does look-up by class. It is `list`. The difference is that `list` only consults the cache, and never polls the API. This is exactly the approach that https://hub.psychoinformatics.de/orinoco/query-things/pulls/6 took, but without (re)using `list`. After the major refactoring over the past days, new helpers and patterns have become available that can be used in this context too. One possible pattern would be that of an externally provided "resolver". Such a resolver can either query the cache via `list`, or it can query the API. The CLI coudl expose a mode switch to select between these alternatives.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
orinoco/query-things#9
No description provided.