I plan to disable the "zero-cache", i.e. cache to disk feature on Android, as it basically is an aberration on flash disks / sdcards typically on those devices, both because of the wear and limited available space.
I assume some "wizard" enables this by default, as generally users have no clue of why their disk becomes full, and even less on how to revert the setting.

This just to check if someone has a smarter idea than a plain #ifdef

We could check the disk size, but that wouldn't remove the wear issue...

A good quality sdcard should handle ~100k write cycles. For an 8GB sdcard this allows 800TB of data to be written in its lifetime.

Assume you are playing high bitrate files (40Mbit/s) I calculate you can play video continuously for 5 years before all sectors are no longer writable.

Now, you may not have perfect wear levelling which may reduce this. But most video files are lower bitrate (especially if streamed from internet), and a couple of hours a day usage is more likely, so the number of years is more likely to be several times higher.

I don't think this is an issue. Sdcards are cheap enough that most users probably wouldn't mind replacing them every couple of years if it improves their video playback experience.

A bigger issue is that "zero-cache" doesn't stop until the whole sdcard is full. At this point apps will start failing to write files which is likely to lead to apps crashing, and failing to save their settings. I think a better solution to this is a setting to limit the amount of disk space that will be used for caching. Perhaps it could default to 75% of free space when streaming starts, but can be overridden in advancedsettings.

I've looked into this a while ago and there is no wizard that turns the zero cache option on, but there are add-ons out there that make it easy to do so from the GUI. They normally give several pre-configured cache settings as options, and the zero cache is one option. It's just one of many risky settings that those configuration tools provide, and without warning. However, I don't think we should not disable those options in core just because someone made an add-on to turn it on. This isn't the only advancedsetting to be abused by some users.

A few weeks ago I started to put more stern warnings on the wiki and when talking to users on the forum, reddit, etc, about using the zero cache setting. This warning about when it shouldn't be used has spread very fast already, and often users are now answering these questions on the forum for us. I think it will balance itself out once the proper education is spread.

(2015-04-29, 19:34)Ned Scott Wrote: I don't like the idea of removing this for Android at all

Let's put it the other way around, then. In which cases is the "zero-cache" setting useful on Android?
Are the benefit greater than making the box of some careless user unusable?

Sure thing: Not using "shady" internet streams, I never get any "buffering" messages on any of my boxes, thus never had to touch the cache settings ever.
We all know that if the bandwidth is not there, file caching doesn't solve anything...

(2015-04-29, 19:37)Martijn Wrote: People won't read it and your warnings will be overshadowed by idiots and their youtube guides

Just because you think all users are stupid doesn't make it so. You also used to think that those warnings were really effective and made a bunch yourself on the wiki.

The majority doesn't have to read the warnings. The people who make the youtube guides and make the "maintenance tools" are the only ones who need to read this, and that is in the process of happening.

I use it all the time. It's a specific feature I've requested time and time again. It's just as useful on Android as it is on any other platform. My boxes on my local network fill their cache as much as possible and as fast as possible, and the end result is my NAS box sleeps more often, I have less traffic on my network, and everything runs more smoothly for me. I'm far from the only one in a situation like that.

Zero cache don't help at all with the piracy add-ons, so you're not sticking it to them there either.

If I have to choose between two groups:

one that carelessly uses "maintance tool" add-ons that have been breaking things for years, even without the zero cache setting.

The other group is people who don't use those add-ons and only use those settings if they need it.

Then yeah, I don't really care about the people who have broken setups because of it. They already think Kodi is broken because their bootleg streaming add-ons have broken links all the time and the twitter add-on has been preconfigured on their system.

They don't dictate what we do. Their abuse shouldn't ruin it for the people who legitimately use this feature, including myself.

Quick Links

About Kodi

Kodi is a free and open source media player application developed by the XBMC Foundation, a non-profit technology consortium.

Kodi is available for multiple operating-systems and hardware platforms, featuring a 10-foot user interface for use with televisions and remote controls. It allows users to play and view most videos, music, podcasts, and other digital media files from local and network storage media and the internet.