CSCfi / CSCfi/rems

Refactor `update-cache`

Open
#3,309 0 comments 0 reactions 0 assignees View on GitHub
Technical Debt
Dominant language
Clojure
Stars
66
Forks
28
Avg merge
7d 4h
Merged PRs (30d)
2

Description

The `rems.db.applications/update-cache` function has some room for later refactoring, as it is getting pretty big. maybe we could split it up somehow? one idea would be
```clojure
[apps change-set] (calculate-updated-apps state ...)
[users change-set] (calculate-updated-users state change-set ...) ; merge change-sets
[roles change-set] (calculate-updated-roles state change-set ...)
new-state (merge apps users roles) ; or (select-keys apps [::raw-apps ::enriched-apps]) etc.
```

_Originally posted by @aatkin in https://github.com/CSCfi/rems/pull/3305#discussion_r1610288656_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.