Skip to content

Improve caching strategy #56

Open
Open
@mco-gh

Description

@mco-gh

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions