Files take a long time to open, but after you do they open instantly

I’m new to nextcloud (literally installed it yesterday) but i noticed files take a long time to load until you load them the first time. Then they can be loaded quickly. I open photo files in a picture viewer through webdav on windows, so it should be opening the whole file in both instances. Any ideas why this is happening? These opened files still open fast even after server reboot. So why is this and can i adjust some sort of setting so it can be used for all files? Does this have something to do with a cache or is this some other reason?