getkirby-v2 / plugins

Kirby plugins from getkirby.com. Extensions, fields and widgets
230 stars 5 forks source link

getCached #504

Open samnabi opened 7 years ago

samnabi commented 7 years ago

GitHub https://github.com/samnabi/getcached

getCached($url, $expires = 3600);

Saves the result of a f::read() request in Kirby's local cache folder. If the cache is not expired, subsequent requests will be served from the local filesystem.

Use getCached() as a drop-in replacement for Kirby's f::read() or PHP's file_get_contents().