dreamcatcher-tech / dreamcatcher-stack

https://dreamcatcher.land
1 stars 0 forks source link

bitswap should use the browser cache #120

Open inverted-capital opened 1 year ago

inverted-capital commented 1 year ago

Bitswap may be able to store items in the Browser Cache so that they can be reused between tabs and possibly between applications, if the same hashed content is requested.

This might give more access to caching than handling it as part of the application directly, as the browser may be more lenient with its cache storage than with application storage. This means we can avoid using the application data as a cache, whilst still maintaining the illusion of low latency.

The less application data we appear to use, the less likely our storage will be evicted.

This model would also put a boundary between ephemeral data and pinned data, whereas currently this boundary is entirely within the application.