ente/mobile/lib/services/machine_learning
Ashil f67dc4893f
[mob][photos] Cache results for Magic section (only visible to internal users) (#2282)
## Description

- Use cached results for magic section so that it does't anymore have to
wait for ML framework to be initialised and doesn't have to re-compute
results every time, which means faster loading of the search tab.
- For internal users, all results in
[here](https://discover.ente.io/v1.json) will show up.
- For non-internal users, once available, results will be limited to 4.
- 4 random prompts are selected from
[here](https://discover.ente.io/v1.json) with non-empty results and are
cached.
- The cache updates when the data updates
[here](https://discover.ente.io/v1.json) (checks size to compare) or in
3 days since the last update.
2024-06-25 12:33:39 +05:30
..