Displaying 20 results from an estimated 10000 matches similar to: "Plugin that will expire_page across multiple servers?"
2007 Sep 10
2
expire_page not working
I''ve enabled page caching on a site I''m currently constructing. The
sweeper is called upon any changes made to the model, as expected.
The sweeper code is as follows:
class PersonSweeper < ActionController::Caching::Sweeper
observe Person
def after_update(person)
expire_staff_page
end
def after_destroy(person)
expire_staff_page
end
def
2006 Mar 09
0
Caching problem: expire_page not working
Hi all,
I''m new to rails and I''ve run in to a rather insidious bug. In
development (with caching turned on in development.rb), my app
successfully caches action "index" in controller "view":
class ViewController < ApplicationController
caches_page :index
def index
# do the stuff that index does
end
end
I''ve got a sweeper
2007 Aug 21
4
[AWDwR] Confused about has_one and has_many
Heya everyone!
I am quite new to Rails and I am reading AWDwR. I am at Task E "Check
Out!". I understand it quite well, but I have a problem with the last
playground exercise: Add a Table which contains the payment types.
All goes well, but I am not sure whether I should use has_many or
has_one(as in the Playground wiki at
http://wiki.pragprog.com/cgi-bin/wiki.cgi/PT-E-3).
I use the
2007 Jan 12
2
Forking a process in Rails is messing up mongrel
I''m trying to run an external Ruby script from my Rails app.
To do this i''m using this function
def fork_with_new_connection(config, my_class = ActiveRecord::Base)
pid = fork do
begin
my_class.establish_connection(config)
yield
ensure
my_class.remove_connection
end
end
Process.detach(pid)
end
Then, within my controller I do this:
2008 Apr 01
1
"Undefined method merge" when using sweeper
Hi,
I''m trying to use sweepers for the first time and got a problem - I
get "undefined method `merge'' for "/signature/
f2d7c7c66450b169.html":String". The "/signature/f2d7c7c66450b169.html"
part of the error message is the cached page.
Here''s my sweeper:
class FooSweeper < ActionController::Caching::Sweeper
observe Foo
def
2007 Dec 13
10
Version naming to use in a RoR proyect
Hi everyone,
I would need to know if RoR follow any policy for version naming; I
mean, something like linux´s kernel does or similar.
For instance, kernel uses numbers separated in groups by dots (i.e.
pre 2.6 - AA.BB.CC). These groups mean differents fixtures, bugs
fixed...
I will start a big proyect from scratch with rails and I want to
choose now a standart to use and avoid future problems
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 Apr 08
2
trouble expiring cached pages
I''m having a bear of a time getting my cached pages to expire. Maybe
one of you guys can help me out. I''ll show my sweeper and then my log
to show that it "should" be working.
class PragmaticSweeper < ActionController::Caching::Sweeper
observe Comment
def after_save(comment)
expire_page(comment.post_id)
end
private
def expire_page(post_id)
2007 Feb 12
6
Cannot send_file then delete it
My application accepts a form to create multiple large(100''s of MB)
temporary files and then zip''s them up to send off to a user.
I have the files constructed, and the zipping working. The problem is
that if I use send_file to send the zip off to the user, I cannot
delete the file afterwards as it seems send_file forks off another
process and deletes the file before the
2007 May 11
3
is_active?
Hey all, i''m rather new to rails and was curious if ActiveRecord
implemented anything like is_active where the delete functions would
just mark records as inactive, vs deleting rows. (similar to created_at,
etc). I need a history of transactions, and this is how I would code in
other languages. Any advice? Is there are smarter way to implement this?
Thanks in advance!
--
Posted via
2006 Dec 11
4
creating a cache in rails
I need to create a small hash of values that persists across requests in
Rails. I cannot store this information in the database or filesystem
and only want to do it in memory. I was looking for a simple solution
to implement this and read somewhere that memcache is pretty much
overkill. This app is only running on one server so putting in memory
should be just fine. I''m very new to
2006 Dec 07
2
backgrounDRb problems with results and MiddleMan
Hi there,
I''ve been experimenting with implementing BackgroundDRb in my rails app but
am running into some problems.
The primary problem I''m getting is in cleaning up worker threads, or getting
any kind of response out of worker threads.
If try using the response function/hash in my Worker the worker will not
execute reporting that response is an unknown variable or function.
2006 Oct 07
2
Proxying Apache to Mongrel, not sure if Apache is serving up static files
Let''s try this one...
I have Apache 2.0.55 set up and also have Mongrel set up. I have
Radiant set up running under Mongrel, and have Apache proxying to the
Mongrel instance. That all seems to be working fine.
I thought I''d modify the settings a bit to let Apache serve up the
static files - images, stylesheets, etc. I have it set up, and am not
getting any errors.
However.
2006 Oct 04
0
first_run timezone weirdness
If you''re in a timezone with an abbreviation that map to more than one
timezone (eg, CST), first_run may not work as you expect it to.
Witness:
$ irb -r time
irb(main):001:0> Time.now
=> Wed Oct 04 20:37:24 CST 2006
irb(main):002:0> Time.parse(Time.now.to_s)
=> Thu Oct 05 10:37:30 CST 2006
Notice the 14 extra hours... Time.parse converted the time thinking
CST meant -06:00
2007 Jul 23
4
RoR Postion. Full time, Utah
We have 2 positions open for experienced ROR programmers. If you feel
like you are a experienced ROR programmer and are looking for a full
time position, please send over you resume. You must be willing to re-
locate. No contract jobs. We have an in house team and have only 2
positions left.
Starting Salary DOE. $30,000-$60,000 with housing, full benefits,
401k, paid vacation, ext. Don''t
2007 Jan 13
6
nice date function
Hi:
you know the way the google and this forum presents dates? How it''s
measure from the current date/time and presents nicely as "39 minutes
ago", 2 days ago, etc.? Has anyone done a gem or other library object
that I can get to do those types of dates?
Thanks so much in advance!
Mike
--
Posted via http://www.ruby-forum.com/.
2006 Oct 17
8
Is it possible to make an online poker clock with ruby ?
I''m just starting to learn ruby and i wanted to set some projects for
myself the 1st of which is a poker clock running online,
but before i start trying to do it i would like to know if it''s
possible. I dont want to waste my time if it''s not possible at all.
Thanks.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You
2006 May 23
2
Can Win32 service more than one rails request at atime?
> On 5/23/06, Walter <Walter at mwsewall.com> wrote:
> [...]
> > I realize that mongrel is not thread safe, I was hoping mongrel might
> spawn a few processes and serve them in the background to emulate what I
> wanted.
> >
>
> Rails is not thread-safe.
>
Yes, that?s what I meant.
<snip>
>
> The idea of the BackgroundDrb is that you perform
2005 Oct 23
2
X/gnome/KDE app that will scroll message across desktop
Is there a "built in" application for X/gnome/KDE that given a text
string scroll it across the desktop? a command line program that did
this would be exactly what I'm looking for.
Is there anything like this? THanks,
Jerry
2007 Jan 22
2
caches_action :index for site root gets propagated to lower levels (how to stop?)
Hello all,
I am running a blog system which has its "/" (home page) cached like
this:
class ApplicationController < ActionController::Base
before_filter :index_cache_expirer, :only => [:index]
caches_action :index
so the site''s top page is caches for 60 seconds in my case
(index_cache_expirer is a home-made function to expire)
on the site, there is also a