Make a ModelCache for each request #2

Open
opened 2020-07-28 12:21:33 +02:00 by ArisuOngaku · 1 comment
ArisuOngaku commented 2020-07-28 12:21:33 +02:00 (Migrated from gitlab.com)

When retrieving models, if it exists in the cache (by id) then return the cached references instead.
For getById requests, or id IN (1, 2, 3...) requests, prefer returning directly from the cache if exists.

When retrieving models, if it exists in the cache (by id) then return the cached references instead. For getById requests, or id IN (1, 2, 3...) requests, prefer returning directly from the cache if exists.

This is doable by using an AsyncLocalStorage.

Also, it might be better to first try to cleanup DB requests (as in deduplicate) before doing that.

This is doable by using an `AsyncLocalStorage`. Also, it might be better to first try to cleanup DB requests (as in deduplicate) before doing that.
ashpie self-assigned this 2021-01-22 16:16:31 +01:00
ashpie added a new dependency 2021-01-22 16:17:23 +01:00
ashpie added this to the v0.26.0 milestone 2021-01-22 16:18:48 +01:00
ashpie added the
feature/enhancement
label 2021-01-22 16:18:55 +01:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: ashpie/swaf#2
No description provided.