This class can cache the contents of remote pages in local files.
It can retrieve the contents of a remote page with a given URL and store it in a local cache file, so next time the same page is requests it will retrieve from the cache file.
The cache file is stored with a given key name in a configurable cache directory. The cache expiry time is also configurable.
If the contents are in the JSON format, the class will return the decoded JSON value.
The class can also delete a given cached page or flush all expired cache files. |