search for: sweeper

Displaying 20 results from an estimated 74 matches for "sweeper".

Did you mean: sleeper
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 call &...
2007 Oct 21
4
Making 'expire_fragment' available to a model?
I noticed a lot of repetition across different Sweeper models in my app expiring the same fragments and so have been trying to move all the expire_fragment calls into another model which the sweepers can then use but it''s not working as I''d hoped.. I''ve created a CacheDestroyer model and want to be able to call something to...
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 f...
2008 Mar 06
3
cache_sweeper
Hi, Why is cache_sweeper not a documented method? I was pretty sure it used to be, but I could be wrong. I can''t seem to find any information on it anymore in the online docs. As a side note, looking at the code for cache_sweeper it appears to only work with the :only option, not :except (ignores it)... what...
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 < Act...
2006 Jul 12
3
Ajax, the Back button, and Sweepers
I''m working on an app that''s basically forms and that makes fairly heavy use of Ajax. As a result of the Ajax usage, if the visitor uses the back button they get the page as it was originally loaded, not as they left it. I''ve looked at the Sweeper documentation and can not tell for sure that it''ll do what I want, which is to force an unconditional reload from the server when the visitor uses the Back button. Anybody got any experience with Sweepers they''d be willing to share? Thanks in advance, Bill -------------- next pa...
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'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/ act...
2006 Jun 27
3
Easy question: Where do I put sweepers?
Trying to implement some sweepers to clean up my caching, but where do I put them? "ruby script/generate sweeeper" does nothing. -- Posted via http://www.ruby-forum.com/.
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 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) logger.error("I made it to the caching metho...
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)...
2005 Jun 26
4
calling controller and caching from a sweeper class
...ts] 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 blog post is created or modified: http://typo.leetsoft.com/trac/file/trunk/app/controllers/xml_controller.rb http://typo.leetsoft.com/trac/file/trunk/app/models/blog_sweeper.rb The normal behavior is that the files get deleted when expire_c...
2006 Jan 27
0
Cache Sweepers and runner scripts that act on models?
I created a script that I call by ''./script/runner -e production UpdateItems.get_new_items()'', which basically calls the model Item: Item.create(attributes...) I''ve set up a cache sweeper which removes caches after each create/destroy/update on Item, and it works fine when accessing controllers via the web server, but apparently doesn''t work via runner. Controllers have a ''cache_sweeper'' class method, but ActiveRecords don''t (though they do ha...
2003 Sep 21
3
Samba PDC not creating roaming profiles
...to receive it. If you are not the intended recipient please inform us of its receipt by you. You are hereby notified that you must not disclose, copy, distribute or take any action in reliance of the contents of this information, which must be immediately deleted. This e-mail was checked by the e-Sweeper Service. For more information visit our website, Baltimore Technologies e-Sweeper : http:// www.mimesweeper.baltimore.com/products/esweeper/ ------------------------------------------------------------------------------------------
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/attach...
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...
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? Thanks for any help. Here is Chad''s full example: class AuditSweeper < ActionCon...
2010 Sep 08
0
Re: Call expire_fragment from outside sweepers or controllers
xponrails wrote: > Hi all. > > I need to expire cached fragments from outside sweepers or > controllers: I have a rake task that calls a method inside a module in > the /lib directory. This task will be called at a scheduled time by a > crontab job. > > After method execution I would like to expire some cached fragments. > > I''ve just tried to import...
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...
2009 Apr 18
0
A bug in sweeper.rb? [was: A frustrating and strange error when config.action_controller.perform_caching = true]
...if respond_to?(action_callback_method_name, true) end The problem is that after the first controller has been cleared controller is nil when it gets to the callback (even if it''s not nil when it hits the after method) I am not quite sure what is the problem but could this be a bug in sweeper.rb? --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, s...