Open gondo opened 11 years ago
Right, but getStoreConfig() uses the cached version of the configuration which doesn't make it ideal for flag setting. If there is a better way, i'm open to it.
And couldnt saveConfig() be found in a helper?
you can reinit config after changing it like this:
http://www.magentocommerce.com/boards/viewthread/44792/
and you can access config via Mage::
from anywhere.
also there is more to saving config as you can have different config per site and store, more here:
http://alanstorm.com/magento_loading_config_variables
overall i'm not sure if core_config is the right place to store this. i would go for custom table.
also i would not call this "queueing" as you are executing curl on all the sitemap links in 1 go.
proper queueing would do 1 curl per 1 request (or 10 curl calls per 1 request)
also doing warmup via magento cron is not the healthiest solution, it can significantly slow down the whole website if the sitmepat is huge, but i guess thats okay for this kind of solution.
Thanks for the valuable input gondo.
I updated the helper.
As for the curl requests, i might switch to curlmulti* at some point.
I typically run the sitemap through siege hosted on my dev box but i needed a standalone version for the client, so it has it's uses.
you should use magento way of getting/setting config, not direct insert/select from database, as if magento update the table structure, your code will break.
Mage::getStoreConfig('foo/baz'); Mage::getConfig()->saveConfig('foo/baz', 'value');
also database manipulation belongs to Model not to Helper