Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on programming.dev
blorp·Blorpbyildar

Saved threads are not cached (?)

Blorp is announced to be a caching client for Lemmy but the first thing that should be cached IMO is Saved posts for offline reading.

Currently Saved does not open in full Offline situation. Is it a bug?

View original on programming.dev
4

5 replies

piefed.zip

Just FYI this community has moved to [email protected], so the dev might not see this post. As far as I know this isn't implemented so its a missing feature not a bug

3
lemmy.world

Community has moved, but I don’t mind answering here.

Offline stuff is…. Complicated. In theory, anything you view should be cached offline for 1 week. But we cache it exactly as you viewed it. If you viewed [email protected] with “Hot” sort, and then you open the app offline and view [email protected] with “Active” sort, you won’t see anything.

I also noticed an issue yesterday where if you scroll A LOT, the apps cache will grow to the point where app performance crawls to a haul. This is because everything is cached for 1 week. So if you scroll an infinite amount of content in 1 week, an infinite amount if content will be cached. For this reason I’ve been considering purging the cache more frequently or after it hits X size.

An easy fix I could do for saved posts is automatically cache them on app launch. That way even if you don’t visit the saved page for >1 week, posts will be cached so long as you opened the app online <1 week ago.

It might be helpful for you to explain how you plan on using the app offline. Are you offline for very long periods of time, or maybe just a few hours?

2
ildarreply
programming.dev

Thanks for the detailed answer.

While the posts are cached the page with the list is not. So you can try it like this: get to full offline (airplane mode) then navigate to Saved.

My use case is reading the bookmarked posts while in subway (no internet in all stations).

Thanks

2

Hmm maybe I can add a fallback case that shows all saved posts regardless of sort. I have to see what the performance impact of that would be. Potentially this could be a very bad idea, because I have to scan through all posts in the cache to see which are saved. I’ll run some tests.

2

You reached the end

Saved threads are not cached (?) | Spyke