cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to store a single setting value for a custom extension

Best way to store a single setting value for a custom extension

Excuse me for the title as I can't find the best way to express the question correctly.

 

I'm developing an extension and apart from the tables with data that I've already created I need to store and access a singe value. In my case this value is a time-stamp of the last sync I did with some external data source.

 

What is the best way to store this value? Should it be a custom variable, a hidden config value, should I create a table just to store this value, should I add a field to every entry keeping last sync date or is there any other way that I miss?

 

Please if you see the relevance of the question but think the title is misleading give me an idea of a better title to change it.

 

Thank you

1 REPLY 1

Re: Best way to store a single setting value for a custom extension

I'll reply to my own post as someone else might find this useful.

After some deep research I found that the best way to store a simple value with no access to the user (admin or ftonend) is core_flag table using Mage_Core_Model_Flag

 

The following post have some more info about this:

http://www.coolryan.com/magento/2014/02/27/save-simple-data-magento-flags/

 

Hopes that saves somebody's time.