insin / insin/react-hn

Improve caching strategy

Open
#56 6 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
2.2k
Forks
328
PR merge metrics
No merged PRs in 30d

Description

I love this app, thanks for building it! But it's missing the mark in an important way. Let me explain...

For me, HN links have a binary utilization profile, by which I mean that I generally click a link exactly zero or one times. Caching on access is useless for me because I don't tend to revisit previously read articles. And the lack of pre-caching means I get the dreaded dinosaur whenever I click on a link I've never visited.

What I'd really like is the following strategy: for every link presented, pre-fetch and cache the article for that link, so that when I'm on the train later and I'm reviewing the front page downloaded earlier, I can click a link and have a true offline "magic moment", where I'm presented with content I've never visited before.

I realize this will cause a high level of cache utilization, but I think it's ok to have a fairly short time to live for these pre-cached items. The HN front page changes frequently enough that the links for the top articles will most likely be gone within 24-48 hours so these pre-cached items can be purged fairly aggressively.

This will also burn a lot of network utilization, which might be impolite for people with limited and/or expensive data plans, but that could be addressed by having a config setting to selectively enable this pre-caching policy.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.