/** * Convert data to a string and store it to a server cache file * If $cache_string is an array, it'll be converted to a string * If $save is string, it'll be used for building the cache filename * * @param string|array $cache_string * @param string|boolean $save write to a file * @return e_pref */ protected function setPrefCache($cache_string, $save = false) { if (is_array($cache_string)) { $cache_string = e107::getArrayStorage()->WriteArray($cache_string, false); } if (is_bool($save)) { $this->pref_cache = $cache_string; } if ($save) { ecache::set_sys('Config_' . ($save !== true ? $save : $this->alias), $cache_string, true); } return $this; }