| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| channels | ||
| mj-logs | ||
| model-pricing | ||
| models | ||
| redemptions | ||
| task-logs | ||
| tokens | ||
| usage-logs | ||
| users |
Summary
-------
1. Pricing generation
• `model/pricing.go`: skip any model whose `status != 1` when building
`pricingMap`, ensuring disabled models are never returned to the
front-end.
2. Cache refresh placement
• `controller/model_meta.go`
– Removed `model.RefreshPricing()` from pure read handlers
(`GetAllModelsMeta`, `SearchModelsMeta`).
– Kept refresh only in mutating handlers
(`Create`, `Update`, `Delete`), guaranteeing data is updated
immediately after an admin change while avoiding redundant work
on every read.
Result
------
Front-end no longer receives information about disabled models, and
pricing cache refreshes occur exactly when model data is modified,
improving efficiency and consistency.
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| channels | Loading commit data... | |
| mj-logs | Loading commit data... | |
| model-pricing | Loading commit data... | |
| models | Loading commit data... | |
| redemptions | Loading commit data... | |
| task-logs | Loading commit data... | |
| tokens | Loading commit data... | |
| usage-logs | Loading commit data... | |
| users | Loading commit data... |