We created a social media app on top of IPFS that is similar to Medium. We store posts as JSON objects to DAG, and we save images as files (not DAG) to IPFS. We load images through IPFS gateway and it works fast and images get cached by the browser. But posts work not so good. We cannot load them via IPFS gateway (because a post is stored as DAG?). And looks like the posts are not cached by the browser. Can you help us with the next questions, please?
- Does the content caches when it’s loaded from IPFS via the “GET” request? AFAIK, but still not sure, only images that we fetch directly from IPFS Gateway are cached.
- If only content from IPFS Gateway is cached, then how to access it using Dag? I’m asking because we cannot fetch content from the gateway using CID returned by Dag.
- Is there a way to load a batch of data from IPFS providing, for example, an array of CIDs?
You can track the issue in the network tab (DevTools) on the main page, or this one if you set pagination to 100 elements/page.
Here’s how it looks like: