eliminate usage of localstorage to cache tag autocomplete results (fixes #3543)
This commit is contained in:
@@ -44,6 +44,7 @@ class ArtistsController < ApplicationController
|
||||
end
|
||||
format.json do
|
||||
render :json => @artists.to_json(:include => [:urls])
|
||||
expires_in 7.days
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -108,6 +109,7 @@ class ArtistsController < ApplicationController
|
||||
end
|
||||
format.json do
|
||||
render :json => @artists.to_json(:include => [:sorted_urls])
|
||||
expires_in 7.days
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -22,6 +22,10 @@ class PoolsController < ApplicationController
|
||||
format.xml do
|
||||
render :xml => @pools.to_xml(:root => "pools")
|
||||
end
|
||||
format.json do
|
||||
render json: @pool.to_json
|
||||
expires_in 7.days
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ class SourcesController < ApplicationController
|
||||
|
||||
respond_with(@source.to_h) do |format|
|
||||
format.xml { render xml: @source.to_h.to_xml(root: "source") }
|
||||
format.json { render json: @source.to_h.to_json }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ class TagsController < ApplicationController
|
||||
|
||||
def autocomplete
|
||||
@tags = Tag.names_matches_with_aliases(params[:search][:name_matches])
|
||||
expires_in 7.days
|
||||
|
||||
respond_with(@tags) do |format|
|
||||
format.xml do
|
||||
|
||||
@@ -27,6 +27,10 @@ class UsersController < ApplicationController
|
||||
format.xml do
|
||||
render :xml => @users.to_xml(:root => "users")
|
||||
end
|
||||
format.json do
|
||||
render json: @user.to_json
|
||||
expires_in 7.days
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -29,6 +29,10 @@ class WikiPagesController < ApplicationController
|
||||
format.xml do
|
||||
render :xml => @wiki_pages.to_xml(:root => "wiki-pages")
|
||||
end
|
||||
format.json do
|
||||
render json: @wiki_pages.to_json
|
||||
expires_in 7.days
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user