diff --git a/The-getSimpleHTMLDOMCached-function.md b/The-getSimpleHTMLDOMCached-function.md new file mode 100644 index 0000000..670d387 --- /dev/null +++ b/The-getSimpleHTMLDOMCached-function.md @@ -0,0 +1,7 @@ +The `getSimpleHTMLDOMCached` function does the same as the [`getSimpleHTMLDOM`](#the-getsimplehtmldom-function) function, except that the content received for the given URI is stored in a cache and loaded from cache on the next request if the specified cache duration was not reached. Use this function for data that is very unlikely to change between consecutive requests to **RSS-Bridge**. This function allows to specify the cache duration with the second parameter (default is 24 hours / 86400 seconds). + +```PHP +$html = getSimpleHTMLDOMCached('your URI', 86400); // Duration 24h +``` + +**Notice:** Due to the current implementation a value greater than 86400 seconds (24 hours) will not work as the cache is purged every 24 hours automatically. \ No newline at end of file