Displaying 20 results from an estimated 3000 matches similar to: "caches_page questions"
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
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 Aug 19
1
caches_page does not follow url path
I am using lighttpd. I have a controller (headlines) with a caches_page
:index. When invoked via http://0.0.0.0:3000/headlines/ I find a
index.html cached in the public folder. The server did not create a
headlines folder and place the cached index page within the controller
directory as expected. Is there a configuration detail I need to change?
2006 Aug 22
1
Why the caches_page can not work?
Hi,I want the page to be cached and be accessed by all users.And in my
controller:
class MyController < ApplicationController
caches_page :show
def show
render :layout => false
end
end
When I use link_to_remote to use My/show to update some div, i can not
see the template has been cached. However,If I use
<%= render_component :controller => ''My'',
2006 Jan 19
8
Pagination_links without "?page=" but with params[:id]
Hello,
With default pagination I have this :
<a href="/users/infos/3?page=1">1</a>
<a href="/users/infos/3?page=3">3</a>
but i need this :
<a href="/users/infos/1">1</a>
<a href="/users/infos/3">3</a>
I need to remove the "?page=" parameters and rewrite a little the link ( with a link_to ? )
2006 Feb 04
4
Page caching feeds and cache file extensions
I have a feeds controller which generates RSS and Atom pages. I put
''caches_page :show'' in it. The problem is that the pages are saved with
an html extension. As a result, browsers display the cached feeds as
HTML rather than XML, and feed validators complain.
There''s an option to set ''Base.page_cache_extension'' globally, but I
don''t want
2006 Feb 07
1
Page caching when name contains a dot (period)
Hi Everyone,
Just thought I''d post some details of an interesting little quirk I''ve found
with page caching.
For a site I''ve just built for a small music festival, there are a number of
artist profiles. I''m storing the artists in my database, but using
caches_page to speed things up when displaying the details to the public.
I''ve also made it so
2012 May 11
14
What is the point of using :format in routes?
Today I had a strange behavior that made me suspect of jQuery at first,
but then it happened that I''ve faced two gotchas, one from CoffeeScript
and one from Rails itself.
I have something like this:
routes.rb
post ''/fields/:id.:format'' => ''fields#show'', as: :field,
constraints: {id: /\d+/}
post ''/fields/remove/:id''
2006 Apr 08
4
rails won''t cache my action
I''ve decided to dive into page caching for my rails app. I''m doing my
testing with webbrick and it refuses to display the cached page for a
particular action. I''ve modified my paginator helper to put the page
parameter in the url so that the paginated page can be used with
caching. This works perfectly when the page parameter is in the url (ie
browse/2006/2 or
2006 Jun 14
1
page caching with custom routes
hi ,
I''m having problems with expire_page with custom routes
i''ll show some code
blog_controller
---------------
def clear_cache_rss_artikels
expire_page url_for(:controller => "xml",:action => "rss_artikels")
end
this is called when a new article is posted or edited or destroyed
xml_controller
---------------
class XmlController <
2006 Oct 12
2
HowTo autogenerate a cahced page that was deleted
Hi
I am using "caches_page :index" to cache a page.
I delete this file via a cron tab command every 1 hour.
However, right after the file is deleted the very next user experiences
a huge delay because the page is being generated.
Is there anyway to autogenerate the file before the very next user
requests the page? A unix or ruby solution would do.
thanks,
-- nueromancer
--
Posted
2006 May 17
2
Caching doesn''t work at all...
Installed RoR under lighttpd and noticed that caching some actions
didn''t accelerate page serving. The following little example of
class TestscriptController < ApplicationController
caches_page :index
def index
@string = Time.now.to_s
end
end
and
<html>
<head>
<title>Test</title>
</head>
<body>
<p>Test</p>
<p><%=
2005 Jun 26
4
calling controller and caching from a sweeper class
[cross-posting to rails and typo lists]
Hi,
I''m tinkering with the code for typo, a rails-based blog engine.
Typo has an XmlController with actions "rss" and "atom" which generate feed.xml
files, and it uses a caches_page declaration to cache the files that get
generated by those actions. It also has a Sweeper (Observer) class that expires
those cached files when a
2006 Jul 20
5
Apache 2.2, Mongrel and #caches_page
Hi !
I''m no expect when it comes time to configure Apache. I just enabled
page caching in my Rails app, and am now looking at making Apache
serve the cached files instead of calling into Rails.
I know Mongrel is able to serve cached files if it finds them, but I''d
like Apache to do it.
Looking at .htaccess, there is this section:
RewriteEngine On
RewriteRule ^$ index.html
2005 Mar 10
6
images from database + caching
Is the information in
http://wiki.rubyonrails.com/rails/show/HowtoUploadFiles on caching
images still the best way on how to cache images that are served from
the database?
I haven''t added time information to my image table yet, and the images
are sent after every single page view (even if it''s been downloaded
already).
Joe
2007 Jan 03
1
Added :group option to paginate method
Ok, nothing really difficult, I add the possibility to call the
paginate method
with the :group option.
Please, someone can tell me how to submit this patch?
Thanks
Sandro, sandro@railsonwave.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To post to this group, send
2005 Dec 18
0
Caching question
I''ve got caching mostly working but it''s acting string with the index/home.
On the site I have a redirect the points http://nutritionreality.com at
http://nutritionreality.com/home
I do this in routes.rb by:
map.index '''', :controller => ''home'', :action => ''index''
Caching happens on index (index.html gets created in
2017 Aug 05
3
by() subset by factor gives unexpected results
I am having trouble understanding how the 'by' function works. Using
this bit of code:
i <- data.frame(x=c(1,2,3), y=c(0,0,0), B=c("red","blue","blue"))
j <- data.frame(x=c(1,2,3), y=c(1,1,1), B=c('red','blue','green'))
plot(0, 0, type="n", xlim=c(0,4), ylim=c(0,1))
by(i, i$B, function(s){ points(s$x, s$y, col=s$B) })
2009 Dec 31
3
Dialplans & Holiday Dates
I have a working dialplan for our phone system with Mon-Fri, business
hours identification, etc. But what I'm lacking right now is support
for company holiday dates.
What I'd like to do is to create a database of these dates and just
update them as new years rollover.
I suspect others have done this sort of thing with Asterisk before, but
I've not found any resources so far.
2005 May 27
2
undefined method `>' for nil:NilClass
I''m following the Depot tutorial in the Rails book, and have just hit a wall.
As instructed by the tutorial, I added the following code to the Product model:
protected
def validate
errors.add(:price, "should be positive") unless price > 0.0
end
When I attempt to add a new product, I''m getting an error:
undefined method `>'' for nil:NilClass