search for: cache_pag

Displaying 7 results from an estimated 7 matches for "cache_pag".

Did you mean: cache_page
2005 Nov 11
0
cache_page throwing "undefined method merge" error
...che.data (which can be XML or HTML) Here''s the controller: class DisplayController < ApplicationController caches_page :xml, :html session :off def xml @cache = Cache.find(params[:id]) response.headers[''content-type''] = @cache.browser_content_type #cache_page @cache.data, "/display/xml/#{@params[''id'']}.xml" end def html @cache = Cache.find(params[:id]) response.headers[''content-type''] = @cache.browser_content_type #cache_page @cache.data, "/display/html/#{@params[''id''...
2006 Mar 01
3
Security issue: a user can fill cache with random urls
Say your app responds to : store/show/3 and caching is enable at the store controller level. A route says : map.connect ''store/:action/:id'', :controller => ''store'' All the following urls will be processed and cached (the cache filling with ''page not found'' messages) ! store/foo/bar store/show/090934298234897342
2006 Mar 22
0
page caching
I''m trying to use the following methods (extract): expire_page :controller => "site", :action => "funding" cache_page :controller => "site", :action => "welcome" to rebuild my entire site cache from an admin page, but I can''t seem to get the cache_page function to work. looking at the docs there seem to be 2 versions of cache_page, one controlled by an options list the other o...
2006 Jul 10
2
Mongrel caching
I am using mongrel to serve static as well as dynamic pages. The static page''s controller contains the following line of code: after_filter {|c| c.cache_page} This code caches that page as a static html page that does not have to be rendered form multiple files (the view and layout). I got the idea to do this form the rails recipes book. It definitely cached the pages. Wen I make changes now, I do not get an updated page. I have commented out the...
2005 Mar 16
6
caches_page problem
I''m currently caches_page the show method in my Image controller. The show method looks at @params[''id''] to determine what output should be generated. The first time I access the method, say with http://localhost/public/image/show/1.jpg, the appropriate directories get created in /public (i.e. public/image/show/1.jpg). However, when I try to retrieve
2006 Mar 27
0
render_to_string troubles
...s) # pull the page in as a string # set page parameters first: if options.has_key?(:params) options[:params].each_pair { |key, value| @params[key] = value } end page = render_to_string(options) # write the rendered content to the right place cache_page(page, options) end I can see the parameters have been set, but somehow the ''page'' parameter never gets processed by the funding action, so I end up with a 4 pages that all have the same content (the simple funding page). My ''funding'' action also has a bunch...
2008 Sep 24
3
caches_page :if not executing (but caches_action :if) does
Hi folks - Seeing a weird problem and would love some help. It''s documented in http://pastie.org/278310 to be more readable. In short, I have a caches_page "action", :if => {stuff} but the :if is never being called - the action is just caching every time. (If I put a debugger call in the :if block, it never stops.) If I replace caches_page with caches_action, the if