kidasov
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2017
01:53 AM
Image caching
Sup, guys! Can someone tell me how to cache images and videos in Roku. How much cache size is ?
I read this topic about file system https://sdkdocs.roku.com/display/sdkdoc/File+System I didn't found any storage type that can be used for caching.
Any help will be appreciated!
I read this topic about file system https://sdkdocs.roku.com/display/sdkdoc/File+System I didn't found any storage type that can be used for caching.
Any help will be appreciated!
8 REPLIES 8
tim_beynart
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2017
10:14 AM
Re: Image caching
you can save to tmp storage but there is no way to determine how much memory is available. We use code to delete the oldest images when downloading new ones and keep very few images locally to avoid issues with storage.
kidasov
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2017
06:30 AM
Re: Image caching
Thank you! I am looking forward to meet a new Roku OS 8 to use image caching 🙂
NB_
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2017
12:28 PM
Re: Image caching
"kidasov" wrote:
Thank you! I am looking forward to meet a new Roku OS 8 to use image caching 🙂
to curb your enthusiasm: i doubt cachefs:/ will make any difference from tmp:/ for you, assuming there is no "sacrificial" USB flash drive plugged. I don't think that is common, except for RokuTV owners that use Live TV Pause
kidasov
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2017
12:42 AM
Re: Image caching
"RokuNB" wrote:"kidasov" wrote:
Thank you! I am looking forward to meet a new Roku OS 8 to use image caching 🙂
to curb your enthusiasm: i doubt cachefs:/ will make any difference from tmp:/ for you, assuming there is no "sacrificial" USB flash drive plugged. I don't think that is common, except for RokuTV owners that use Live TV Pause
Copy paste from here https://blog.roku.com/developer/2017/10/02/roku-os-8-developer-release-notes
- [BETA] New file system for data caching — A new file system, cachefs:[/url:3pygd6ez], has been introduced to allow applications to cache data to volatile or pers...
I thought that shared-in memory cache gives permissions to the roku storage to create files, that are retained when application exits. Am I incorrect? So how I can apply image caching to my app?
Is there a way to cache images, because every time we close app, we lose all data, we can't save anything in storage. After user opens app he always downloads same assets again.
It is a bad practise for me 😞 Please help and thank you for your time.
NB_
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2017
10:12 AM
Re: Image caching
"kidasov" wrote:
I thought that shared-in memory cache gives permissions to the roku storage to create files, that are retained when application exits. Am I incorrect? So how I can apply image caching to my app?
Files should persist this way on app exit/restart - in cachefs: and maybe in tmp: (unsure about the latter) - but not through reboot. And there are low-memory conditions when the device needs memory, it will be flushing cache files to make space. Which is typical of caches. Side note is optimize your images for size - higher compression or maybe design for HD instead of FHD, so images download faster
squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2017
10:29 AM
Re: Image caching
"and maybe in tmp"
Um.. no.
Um.. no.
Kinetics Screensavers
NB_
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2017
10:37 AM
Re: Image caching
"squirreltown" wrote:
Um.. no.
The noes have it.
kidasov
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2017
01:25 AM
Re: Image caching
Thank you for information! I highly appreciate, that you saved me a lot of time! 🙂