HelgeSverre / gs-plugin-installer

A Plugin Installer for GetSimple CMS
GNU General Public License v3.0
2 stars 0 forks source link

Fix for issue #3, put cache expiry option in config var #16

Closed webketje closed 6 years ago

webketje commented 6 years ago

Added $cache_expiry_days option. Users can find the line new PluginInstaller in gs_plugin_installer.php and replace the second parameter with a day value (1 = full dat, 1/2 = half a day, 1/4 = 6 hours,...)

webketje commented 6 years ago

My reasoning was that since: -> GS API only updates every 4 hours -> GS Extend only has an avg. of 3 plugin updates/ month over the last year -> the average user is probably not that hyped up to look up new plugin updates it was pretty useless to refresh at a more frequent rate. Besides, they can always refresh manually if they really want it up 2 date.

On the other hand both could be equally easily applied if the conversion was done in the parameter: (e.g. in gs_plugin_installer.php, have:)

$cache_expire_days = 1;
$cache_expire_hours = 0;
new PluginInstaller("/path/to/cache", (24 * $cache_expire_days) + $cache_expire_hours);
HelgeSverre commented 6 years ago

Fair enough, in that case days will be sufficient :)