Displaying 20 results from an estimated 600 matches similar to: "A bug in sweeper.rb? [was: A frustrating and strange error when config.action_controller.perform_caching = true]"
2009 Apr 17
0
A frustrating and strange error when config.action_controller.perform_caching = true
Hello all.
I am having a hell of a problem and it''s driving me nuts. I get the
following error (undefined method `controller_name'' for nil:NilClass): but
only when config.action_controller.perform_caching = true
I googled around some and found this thread
http://groups.google.com/group/communityengine/browse_thread/thread/b84154e5228bf9f3which
suggests it may be a conflict with
2006 Sep 12
2
Cache sweeping and render_component (my mistake or Rails bug?)
Hi
I''m working on a program which relies on heavy cache sweeper usage.
I''ve just bumped onto an odd problem. When using render_component
method in layouts or templates with cache sweeping turned on, Rails
throws an exception with the following message:
NoMethodError in TestController#index
You have a nil object when you didn''t expect it!
The error occured while
2006 Mar 16
3
inserted_at seems buggy in production mode?
Hi,
I''ve got a table with an inserted_at column. When I insert a record it
automatically injects the current date/time, all is well.
Then when I insert a second record, it uses the exact same timestamp
that is used in the first record.
This behavior only seems to occur in production mode. When I restart the
server, the problem goes away but then immidetatly occurs again on the
2007 Oct 24
0
Sweeper for few models
For example - i have a sweeper for one model(in this case About).
class AboutSweeper < ActionController::Caching::Sweeper
observe About
def after_create(data)
expire_about(data)
end
def after_save(data)
expire_about(data)
end
def after_destroy(data)
expire_about(data)
end
def expire_about(data)
FileUtils.rm_rf
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 Feb 14
4
cache sweeper not getting called
Hi,
I''ve started to implement page caches but I''ve hit a brick wall getting
a sweeper to clear the cache when needed. It seems that any models that
I tell it to observe aren''t being observed properly. If I add the
sweeper to a controller the initialize method runs, but no matter what I
do the after_save/after_update callbacks aren''t running. Also if I try
to
2006 Sep 15
2
Caching::Sweeper Access to Controller
Hello,
I''m running Mongrel 0.3.13.3, cluster 0.2.0, and Rails 1.1.6 and I
have a problem with a sweeper not having access to the controller
instance.
NoMethodError (undefined method `session'' for nil:NilClass):
/app/models/audit_sweeper.rb:16:in `log''
/app/models/audit_sweeper.rb:9:in `after_update''
2008 Jan 26
0
"value must be enumerable" exception when using a sweeper?
Folks,
I''m going slightly crazy here - I implemented a Sweeper in an older app
and used nearly the same exact code in my new app, yet I keep getting
this ''value must be enumerable'' exception. Even after I cut most of the
code away, I still get the error. If anyone can help, I would be much
obliged.
Notes: I''m using Engines... wonder if that could cause a
2009 Aug 04
0
Authlogic::How to access current user from within a cache sweeper?
So I''m trying to follow along in Chad Fowler''s Rails Recipes (recipe
#59, Keeping track of who did what) and I simply want to access the
current user from within my cache sweeper. Normally you just
reference @current_user but that doesn''t seem to be the case here.
In Chad''s example, he calls controller.session[:user]. What''s the
Authlogic equivalent?
2012 Sep 28
1
How the difference between Observer and Sweeper?
I''m think to use any to work with cache. How I should to use.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
2006 Sep 07
4
How to setup a sweeper to restart stale or hung mongrel servers
How do I setup a sweeper to restart stale or hung mongrel servers?
--
Jared Brown
jaredbrown at gmail.com
(765) 409-0875
7001 Central Ave
Indianapolis, IN 46220
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060907/0994017f/attachment.html
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
2005 Apr 25
1
Problems when using sweepers with postbacks
I''m using a cache sweeper class [1] to take care of some pretty complex
sweeping. However, there is a problem with the current implementation.
Namely, the sweeper gets called only when an action named in
cache_sweeper is called using GET. As many methods where sweeper would
be useful are using postback to send the form to the same action, this
causes the cache to get swept when
2007 Oct 27
1
Edge Javascript caching just not working
For some reason, in production, with this one line of code:
javascript_include_tag :all, :cache => true
I get this:
<script cached="true" src="/javascripts/prototype.js?1193454472"
type="text/javascript"></script>
<script cached="true" src="/javascripts/effects.js?1193454472"
type="text/javascript"></script>
2010 Jun 08
1
session_options[:secure] resets session_id on every request
I''m working on an ecommerce site (in Rails 2.3) and I added:
ActionController::Base.session_options[:secure] = true
to ~/config/environments/production.rb
Now, every time I add something to my shopping cart and navigate away I
get a new session_id (which essentially empties my shopping cart).
How can I get the continuity of my sessions back, while still having the
session_id get set
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 Jan 03
5
Are cache sweepers used?
After drawing many virtual blank stares in the IRC channel and finding
zero results on the wiki for ''sweeper'' I''m left to wonder whether
these are actually officially supported, or are on their way toward
being deprecated. Is there a better way of expiring caches on model
saves and deletions?
Sincerely,
Tom Lieber
tom@alltom.com
http://AllTom.com/
2006 Aug 01
2
Same <img> is still downloaded for several times in IE
Last time i ask the same question here that if one article item has a
default icon in front of its title,the icon will be downloaded as many
times as the article items displayed in one page in IE. I was suggested
to modify some options under development enviroment,eg:
config.cache_classes and config.action_controller.perform_caching in
development.rb are both set to true.But the problem still
2005 Sep 27
2
caching in development mode
Hi, I created some new models that do not extend
ActiveRecord::Base. For some reason, these classes are being cached
in development mode. Controllers are not cached, neither are models
extending ActiveRecord::Base. Has anyone else seen this?
Here are my relevant development.rb settings:
Dependencies.mechanism = :load
2008 Sep 12
1
Ruby Pages Not Updating
I am a complete beginner to Ruby. I followed the tutorial to create my
own scaffold called Books. My problem is that, when I make changes to
its index.html.erb, the http://url/books page does not update for a
few minutes. I am using a development environment, and the
config.action_controller.perform_caching value is already set to
false. Any help would be appreciated!