Displaying 20 results from an estimated 10000 matches similar to: "caches_page does not follow url path"
2005 Apr 27
3
caches_page questions
I''m attempting to use caches_page to speed up the loading of certain
pages on my site, and have run into a couple questions:
1) The site has ''states'' (as in U.S. states), so I have a State model
and a States controller. Going to http://sitename/states/ routes you to
the States controller, ''index'' action. The States controller looks like so:
class
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
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 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><%=
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
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 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 Mar 06
7
Set base url?
I have an application running on a Lighttpd instance which is proxied by an
Apache server. It seems to work fine but my urls are incorrect: all urls
reference / which is not where my application runs at the Apache server.
How do I set the base url of a Rails application?
My Apache has the following proxy rules:
ProxyPass /hieraki http://localhost:3001
ProxyPassReverse /hieraki
2006 Mar 21
8
Redirect without port number?
On my host I run my lighttpd instance bound to a specific port and my
hostname is mapped to this port (I''m not exactly sure how this is
accomplished, but it is lighttpd also listening on port 80 which handles
this for me I believe).
A redirect from rails includes my local port number in the request, so that
it shows up in the address bar. I prefer people not to see this - I
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 Nov 04
0
page caching urls with space characters broken in webrick and mongrel
Page caching of urls with spaces in them using WEBrick and Mongrel is
broken in Edge Rails (and Rails 1.1.6, where I started). This is due
to the dispatch flow of control in both servers converting ''+'' in
requested paths into '' '' chars, whereas the page caching system writes
cache files for URLs with spaces in them out as encoded ''+''
2006 Mar 23
7
Fixtures just Do Not Work for Me
Hello,
I have been struggling to get fixtures to work here with no success.
They just Do Not Work For Me (tm).
I have created a model named Headline with the `generate'' script and
modified the test/fixtumes/headlines.yml as follows
----------
gita:
id: 1
author: raulseixas
title: gita
happened_at: 2005-01-01 00:00:00
description: gita
This is the CD reissue of
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
2005 Nov 30
1
[lighttpd] proxy.server and url.rewrite-once
i have a very simple lighttpd config that just forwards with mod_proxy
some requests to different hosts lixe this:
server.modules = ( "mod_proxy", "mod_rewrite" )
server.port = 80
server.pid-file = "/var/run/lighttpd.pid"
server.errorlog = "/var/log/lighttpd-err.log"
server.document-root = "/var/www/htdocs/"
2006 Jan 14
4
Rails URLs always try to open non-existent files
The lighttpd config file is set up like this...
Rails url: //host/controller/method/id
Lighttpd tries to open the file ''controller/method/id'' from the document root.
Of course this doesn''t work and generates an error 404
This gets caught with: server.error-handler-404 = "/dispatch.fcgi"
Which turns the request into "/dispatch.fcgi"
That gets caught
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
2008 Sep 23
3
Finding distinct months using find_by_sql
Hello,
I''m wondering if someone might be able to offer me a solution to the
following problem that has so far stumped me.
I''m trying to get the distinct months (and years) from a date field to
display as a list in a view. For example, there might be a number of
records stored with dates in the table ''headlines'':
name date
record1 21-09-2008
record2
2006 Jun 28
7
caching objects
Hi,
i just wanted to say my sorries in advance (sorrie/sorry/sorri)...i have
just started learning about the subject of caching, but unfortunately
haven''t effictively managed to implement what i had learned.
obviously it''s possible to cache a whole page, or action with the
caches_page :x or caches_action :y methods, but for some reason it
hasn''t really worked with
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
2011 Jul 11
1
Finding Confidence Intervals
This is a very basic question, so please bear with me.
I've been learning about AB Testing, which is largely used in internet
marketing to examine the effectiveness of certain aspects of ads, websites,
etc. Here's a couple links to people who want to know more about AB Testing: