Best way to retrieve external data

I have pages for which a part of the data (views count of a video) is available from an external API service. What is the best way to integrate this data in Kirby? My current approach is that with a separate script i would retrieve this API data every 3 hours and add it directly in the .txt files. The problem however is that these direct edits won’t be picked up by kirby, even though i make sure to change the file dates. I feel there must be a smarter way to deal with this but i lack the experience. Can anyone point me in the right direction?

They should be, unless you are using Kirby’s cache and don’t flush the cache when updating your content programmatically.

1 Like

Thanks, i use zero one theme and it has cache. I have now set up a cron job to delete the cache folder and will see if that fixes it.

I am now deleting the cache folder and this seems to work.