mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-22 11:44:39 +02:00
Created The getSimpleHTMLDOMCached function (markdown)
parent
2fff1c7536
commit
3648a96c6d
1 changed files with 7 additions and 0 deletions
7
The-getSimpleHTMLDOMCached-function.md
Normal file
7
The-getSimpleHTMLDOMCached-function.md
Normal file
|
@ -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.
|
Loading…
Add table
Add a link
Reference in a new issue