Cacheing of images in binding

I was wondering if there is some standard way of cacheing files (or in this case images) with OpenHAB.
I saw this thread but I guess it’s not user generated and can easily be refetched but the images are on an external server and I want them to work without internet.

I’m not sure I understand why you want to work like you do

I have everything from my openhab configuration, in a source control system.
I can update the configuration on my computer, upload them to the source control system and then push a button on openhabe that launches a local script that download the latest version.
So it stays working completly disconnected from the web, it only needs connection the moment I want to update the scripts (or in your case files and images)

The binding fetches images for games from Playstation Store depending on which game/app the user is currently using on his PS4. When the user switches game a new image is downloaded, when the user switches to a previous game I would like to use a cached image instead of downloading it again to save bandwidth for all involved.

technically you can still upload it to a source control system and download it from there, yet I do think there might be easier solutions.
I thought openhab did have some integration with dropbox yet I can’t find anything back now.
I don’t have any other idea

Hi @FluBBaOfWard,

the framework itself provides some caching solutions but unfortunately no file based cache services. We have some bindings using their own implementations. If you are interested in contributing a general solution here is the right place to look:

1 Like

I don’t think I’m ready to write a caching solution just yet. I will take a look at what the others have done so far and maybe come with some ideas. Thanks for the input.