What is the best practice to save a module state on Magento 2.3.x?
-
06-04-2021 - |
문제
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 :
- Using Config (core_config_data).
- Using Variable (variables) also known as "Custom variables".
- 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
제휴하지 않습니다 magento.stackexchange