working cache
This commit is contained in:
1 parent
0e65e379b0
commit
4daf36908c
14 files changed
+41
-8
No files matched your search
@@ -6,7 +6,7 @@ class Admin::ModuleAppsNewInterfaceController < OrbitBackendController
|
||||
layout "new_admin"
|
||||
|
||||
def setting
|
||||
@sys_users = User.all(conditions: {admin: false}).includes(:avatar)
|
||||
@sys_users = Rails.cache.read('user_setting') #User.all(conditions: {admin: false}).includes(:avatar)
|
||||
@module_app = ModuleApp.find(params[:module_app_id])
|
||||
@options_from_collection_for_select_bulletin_categorys = [@module_app].collect{|ma| [ma.title,ma.id] }
|
||||
# if params.has_key? :category
|
||||
|
||||
@@ -48,6 +48,12 @@ class Admin::PagePartsController < ApplicationController
|
||||
if @part.update_attributes(params[:page_part])
|
||||
set_children_sub_menu(@part) if @part.public_r_tag && @part.public_r_tag.eql?('sub_menu')
|
||||
flash.now[:notice] = t('admin.update_success_content')
|
||||
|
||||
if @part.page.name == 'home'
|
||||
expire_page '/'
|
||||
else
|
||||
expire_page page_path(@part.page.name)
|
||||
end
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
redirect_to admin_page_url( @part.page )
|
||||
|
||||
@@ -3,11 +3,11 @@ class PagesController < ApplicationController
|
||||
include ApplicationHelper
|
||||
|
||||
before_filter :get_item, :only => [:index_from_link, :show_from_link]
|
||||
|
||||
caches_page :index
|
||||
def index
|
||||
@item = Page.find_by_name('home')
|
||||
|
||||
if @item && (stale? etag: @item.updated_at)
|
||||
if @item
|
||||
impressionist(@item)
|
||||
render_page
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user