本文整理匯總了PHP中Floxim\Floxim\System\Fx::cache方法的典型用法代碼示例。如果您正苦於以下問題:PHP Fx::cache方法的具體用法?PHP Fx::cache怎麽用?PHP Fx::cache使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Floxim\Floxim\System\Fx
的用法示例。
在下文中一共展示了Fx::cache方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: up
protected function up()
{
$new_fields = array(array('keyword' => 'is_published', 'name_en' => 'Is published?', 'name_ru' => '', 'type' => '5', 'not_null' => '0', 'priority' => '267', 'searchable' => '0', 'default' => '1', 'type_of_edit' => '1', 'checked' => '1', 'form_tab' => '0'), array('keyword' => 'is_branch_published', 'name_en' => 'Is branch published?', 'name_ru' => '', 'type' => '5', 'not_null' => '0', 'priority' => '268', 'searchable' => '0', 'default' => '1', 'type_of_edit' => '3', 'checked' => '1', 'form_tab' => '0'));
$content_id = fx::data('component', 'content')->get('id');
foreach ($new_fields as $field_props) {
$field_props['component_id'] = $content_id;
$field = fx::data('field')->create($field_props);
$field->save();
fx::log('add field', $field);
}
fx::data('component')->dropStoredStaticCache();
fx::db()->query('update {{floxim_main_content}} set is_published = 1, is_branch_published = 1');
fx::cache('meta')->delete('schema');
}
示例2: dropStoredStaticCache
public static function dropStoredStaticCache()
{
parent::dropStoredStaticCache();
fx::cache('meta')->delete('schema');
}