revenz / Fenrus

A personal home page for quick access to all your personal apps/sites.
MIT License
521 stars 31 forks source link

Feature request - cached files within smart apps #115

Closed Frooodle closed 1 year ago

Frooodle commented 2 years ago

As a user i would want to be able to utilise a utiliatly method which would allow me to call json files which are static and provide a method of caching the result for future runs to avoid multiple web calls. This method should allow generic caching of a json output (unique per app) as well as caching of a json output based on a key which when changed would require the cache to be reloaded. For my usecase example, i would want to query and cache https://static.developer.riotgames.com/docs/lol/maps.json and https://static.developer.riotgames.com/docs/lol/queues.json but re-query it when a new version appears in https://ddragon.leagueoflegends.com/api/versions.json position 0

Frooodle commented 2 years ago

Even for the https://ddragon.leagueoflegends.com/api/versions.json call it might be nice to cache but clear it every 12 hours or something

revenz commented 1 year ago

dotnet rewrite, creates a instance of the app that is reused for subsequent updates. these are eventually disposed (after 30 minutes), but will provide some caching.

Is this sufficient?