class Model extends Field
{
- protected static $_options = null;
+ protected static $_options = [];
public function getColumnData()
{
protected function _getOptions()
{
- if (null === static::$_options) {
- static::$_options = $this->__getOptions();
+ $cacheKey = $this->getAttribute('name') . '-' . $this->getAttribute('optionsmodel');
+
+ if (!isset(static::$_options[$cacheKey])) {
+ static::$_options[$cacheKey] = $this->__getOptions();
}
- return static::$_options;
+ return static::$_options[$cacheKey];
}
protected function __getOptions()