similar to: Expiring cached actions outside of ActionController

Displaying 20 results from an estimated 2000 matches similar to: "Expiring cached actions outside of ActionController"

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)
2006 Mar 29
2
Fragment Cache Wackiness
I can''t seem to get the fragment cache to use :file_store. I''d really appreciate it if someone could point me in the right direction. Rails 1.1 final, FreeBSD Observe: In environment.rb AND production.rb (for good measure, DRY be damned): ActionController::Base.fragment_cache_store = :file_store, "/www/apps/localfeeds/directory/tmp/fragmentcache/" At the console
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 the effect of:
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 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
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
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
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
2006 Mar 21
4
Feedtools
Hi all, Is anyone else seeing silly amounts of segfaults with Feedtools? They''re regular enough to make it unusable, but I haven''t pinned down what''s triggering them yet. Here''s the error: > deadlock 0xb75970a8: run:-/usr/lib/ruby/1.8/timeout.rb:42: [BUG] Segmentation fault > ruby 1.8.3 (2005-06-23) [i486-linux] Naturally, that knocks over WEBrick,
2005 Mar 10
6
Expiring Cache Fragments and fcgi
First let me say that Rails caching is very very cool. The traffic (and responsiveness) I''ve saved by added 10 lines of ruby code would be enourmous, if I actually had traffic... ;) Sweepers as observers are great, btw. Since every page of my side is dynamic, once I did some DB optimization I''m caching the content of the index page which was taking the bulk of the time to load
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 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
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 Mar 25
4
ajax and clearing the form
Hi I played a little bit with rails+ajax, works fine... but how do I reset the form? I tried: --- <%= form_remote_tag(:html => {:name => ''form_update''}, :url => :url_new_item_with_ajax, :update => ''container'', :loading => "Toggle.display(''new-item''); $(''new-item-desc'').innerHTML =
2003 Sep 21
3
Samba PDC not creating roaming profiles
Hi All, I have recently moved my PDC from a linux suse 7.0 box to a Solaris 8 server. I have downloaded the samba 2.2.8a and installed it without any errors. I used my old smb.conf and made the neccasry changes to it, I have pasted it below. I don't receive any errors, it just ends up using a local profile and doesn't bother to update it to the server. I have looked at countless
2010 Mar 28
1
keeping track of who did what
hello everybody. i need to log "who did what" on some models. i was reading recipe 59 of rails recipes and i created something like that: class LogSweeper < ActionController::Caching::Sweeper observe :model1, :model2, :model3, :model4, :model5, ... after_save(model) save_log(model, "save") end after_destroy(model) save_log(model, "destroy) end
2006 May 21
0
expiring cache fragments using script/runner
I''ve just set up caching on my site and want to expire some of fragments on an hourly basis. I was going to use cron and script/runner to do this. For other fragments that I am expiring, I am using expire_fragment inside a sweeper class, something like: class QuestionSweeper < ActionController::Caching::Sweeper observe Question def after_validation_on_update(question)
2005 Nov 01
1
spyware detected (PR#8270)
Gentlemen: I ran a spyware sweep on my computer after installing: 10/07/2005 03:25 PM 27,230,914 R-2.2.0-win32.exe >From the cran website. Spy Sweeper 4.0.3 with the latest definition files found Directory of C:\Program Files\R\R-2.2.0 11/01/2005 09:27 AM 668,938 unins000.exe To have the golden eye signature. This is serious if indeed the uninstall program contains
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
2007 Feb 09
1
after_update and increment!
I''ve got a strange behaviour that didn''t seem to be happening before I upgraded to 1.2. I''ve got two models - questions and results. When a user answers a question, his answer is recorded in results. In my results model, I have an after_create that increments! a count in the question model. This increment is now triggering an after_update method I have in a