문제

I need to save/retrieve information gathered my module. The information might be anything big or small. There may be one or many variables to save and retrieve.

I have identified three ways to save a module state in Magento :

  1. Using Config (core_config_data).
  2. Using Variable (variables) also known as "Custom variables".
  3. Using own resources using a new table in the database.

Which one should I use to save a module state? Are there known best practice for this scenario?

올바른 솔루션이 없습니다

다른 팁

If you need to store data temporarily between script executions or sessions, you might want to look at FlagManager. Data is stored in the flag table.

Usages in core: https://github.com/magento/magento2/search?q=flagManager-%3EsaveFlag&unscoped_q=flagManager-%3EsaveFlag

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top