sb3108sa / phpbrowscap

Automatically exported from code.google.com/p/phpbrowscap
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Allow cache to be forcefully reloaded #8

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
For people running non-default remoteIniUrl, it is useful to be able to
force the system to update the cache. Here the changes that I made to allow
this:
----------------------------
In current Browscap.php:

Add after line 89:
* $forceReload: Allow for a script to force the cache to be reloaded.

Add at line 101:
public $forceReload     = false;

Modify line 229 to be:
if (!file_exists($cache_file) || !file_exists($ini_file) || ($interval >
$this->updateInterval) || $this->forceReload) {

Original issue reported on code.google.com by eric.caron on 25 Mar 2009 at 3:30