5 ms·
> If you instead send an http request to antoher server, you are just introducing a pointless dependency in your system. It will make your system generally slow
by Zababa 5y ago
> If you instead send an http request to antoher server, you are just introducing a pointless dependency in your system. It will make your system generally slower because it will take more time to get answers. There's absolutely no benefit.
To expand on that, here downloading the file is a way of caching the data. Caching invalidation can be tricky, but for something like this it's actually easy, so you can afford all the benefits of a cache.
- bastawhiz 5y agoWhat about the Quran is changing often enough for cache invalidation to be a problem?
- weird-eye-issue 5y ago"Caching invalidation can be tricky, but for something like this it's actually easy"
- bastawhiz 5y agoThe point is that you shouldn't need it at all. There's nothing to invalidate. You don't even need to cache it because there's nothing complex enough to cache. The full dataset is tiny. Adding caching might make it slower, because the cost of computing the data is less than the cost of a cache miss.
- Zababa 5y agoMy point was that downloading the whole thing compared to using the API could be thought as a form of caching. Since it's with data that doesn't change much, the usual difficulty that comes with caching is not here.
- Zababa 5y agoFrom my limited understanding, not much which is why I think caching is safe in that case.