similar to: trouble expiring cached pages

Displaying 20 results from an estimated 100 matches similar to: "trouble expiring cached pages"

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
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 <
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
2006 May 31
0
acts_as_blog
ActsAsBlog ========== Here is a simple plugin to allow you to allow the use of RedCloth,BlueCloth, or SmartyPants in your blog. It''s super simple to use. It will take your blog post or comment and transform it into html. This allows you to write in a much simpler syntax and allows your users to post valid html into their comment. It also allows you to block all html tags that
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 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)
2007 Nov 21
0
Expiring page caches with regexp?
Is there a way to expire page caches using regular expressions like you can with fragment caches? I''m writing an app which has a catalogue style product listing but not full on e-commerce. It''s pretty simple; with just categories and products within them. A url for a product called "Band Saws" within the category "Heavy duty saws" would look like
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 Sep 21
0
Plugin that will expire_page across multiple servers?
Hi all - I was wondering if there''s a plugin out there that will make expire_page work across multiple servers? That is, I''ve got two servers A and B behind a load balancer. If I cache a page eventually it will be cached on both servers. I''d like a way to expire that page and have it happen on both servers. Perhaps some integration with backgrounddrb that could
2006 Jan 21
1
clearing/expiring the ''index'' action.
Hi all, I''m having problems trying to expire the ''index'' action of a controller. In short, expire_action :action => ''index'' doesn''t work, but expire_fragment (url_for :action => ''index'').gsub(/\/index/,'''').split("://").last works fine and deletes the cached page as expected. I
2005 Dec 02
1
cache problem
Hi all I try to cache page ... caches_pag :test ... I want expire cache now. so i turn off environment cache switch and comments above code but, doesn''t work what''s going on? all regards -- Posted via http://www.ruby-forum.com/.
2006 Mar 22
0
page caching
I''m trying to use the following methods (extract): expire_page :controller => "site", :action => "funding" cache_page :controller => "site", :action => "welcome" to rebuild my entire site cache from an admin page, but I can''t seem to get the cache_page function to work. looking at the docs there seem to be 2 versions of
2006 Mar 27
0
render_to_string troubles
Hi, I''m trying to build a simple mechanism for pre-caching a bunch of files by iterating over a hash of options from within a controller: #site.controller: for options in [ { :controller => "site", :action => "welcome" }, { :controller => "site", :action => "about" }, { :controller => "site", :action
2006 Apr 29
1
Caching foor starters
Hi there... I have some experience in building web applications but all of them have been intranet apps so I have never had to think about things like caching. Actually my experience with caching has more been in the area of removing it since it just gets in the way for a intranet app with 10-100 users. But now I am writing a site which might stand or fall by the quality of it''s
2006 Apr 10
3
can I expire a cached page using a regex?
I''m trying to expire all pages under my view action. These could be /controller/view/1 or /controller/view/1/2 how can I expire all pages under /controller/view/? There must be a way, but I''m stumped. Here''s my broken attempt. Thanks in advance for any help,suggestions, or directions to a how to page. expire_action(:controller =>
2006 Feb 21
2
caching and admin area
i have created some ''public'' controllers like so: ./script/generate controller example and an ''admin'' controller like this: ./script/generate controller admin/example now i want to have caching in the ''public'' controllers so i add something like this: caches_action :show, :whatever but i want the ''admin'' controller to do
2006 Apr 11
11
I can''t get rails to see my plugin. How can I this?
I''m trying to produce a plugin to help me with my page caching woes. I can''t seem to get rails to see my method within the plugin. This is my first attempt at a plugin so I''m sure I''m missing something. I''ve created a directory /vendor/lib/plugins/broom_stick/. I then created an init.rb file with: require ''broom_stick'' I then
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
2009 Jul 09
0
Cache expiration with format not working as expected
Hi all, In my OrdersController, I have two actions completed and incomplete that respond_to HTML and CSV. Im also action caching these actions .. caches_action :completed, :incomplete ... def completed @orders = Order.completed respond_to do |format| format.html format.csv {render :layout => false} end end def incomplete @orders = Order.incomplete respond_to do