Displaying 20 results from an estimated 600 matches similar to: "cache_sweeper"
2006 Jan 31
2
Fragment caching and pagination
I''m just getting my hands dirty with caching. The pages I want to cache have
some user specific data on them (for example "log out"). That sent me down
the route of fragment caching. One of the things I want to pagination is a
paginated list. My question is how is pagination and query strings handled
with fragment caching? Does each page get its own fragment and query string
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 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''
2006 Jan 25
1
cache_sweeper causes undefined method error
I created a sweeper ItemSweeper and saved it in
app/models/item_sweeper.rb. Then I put this in my item_controller.rb:
cache_sweeper :item_sweeper, :only => [:create, :destroy, :update]
But now when I call the view action, I get this error:
ActionView::TemplateError (undefined method `title'' for nil:NilClass) on
line #5 of app/views/item/view.rhtml:
5: <H1
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 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 Aug 01
8
Decoupled observers for controllers?
In the Rails Recipes book the recipe "Keeping track of who did what"
explains how to do decoupled observing of models.
In my application I''d like to do a similar thing but watching the
controllers. For example, when somebody hits the login method of the
Security controller, I''d like to make a note of it. In this case I
could observe the User model and watch for
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
2005 Jun 24
3
flashing divs in IE with use of BlindUp and BlindDown
I''m having an issue with flashing divs in IE (firefox is fine and the
only other browser I''ve used)
My scenario is as follows. I have 2 divs (initially hidden) and using
the BlindDown and BlindUp functions (possibly others) the divs flash
when starting to roll down in BlindDown (due to the Element.show call)
and also at the end of the BlindUp call (due to the Element.hide call)
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
2008 Sep 28
4
Cannot expire cache from background process?
Hello,
I am trying to expire fragments (or at least trigger their expiration)
from a daemon that''s running in the background.
The daemon is updating all kinds of important lists every few minutes
from the background.
So I have to find some way to DO or TRIGGER the fragment caching from
this daemon.
Unfortunately just using the normal commands like:
expire_fragment :controller =>
2006 Jun 21
7
sortable tree problem
Hello,
I''m having a problem when I set the tree option to true on Sortable.
If I set the option to false my remote call works fine, but once I set
it to true, I get some weird log errors from Webrick...
undefined method `update'' for "11":String
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/cgi_ext/cgi_methods.rb:214:in
`build_deep_hash''
2007 Mar 03
5
url_for and arrays parameters (diffs between rails 1.1.6 and 1.2.2)
Hello,
I posted this to the main rails list
(http://www.ruby-forum.com/topic/99845), but haven''t received any
replies yet, so maybe this question is better suited here. Sorry if
this has been brought up before, I couldn''t find any previous
discussion on this.
To summarize the post...
When using the latest Rails (1.2.2)
I''m passing an array to url_for like so...
2005 Sep 14
13
table sorting/manipulation library?
I have a library I''ve developed that I believe is the most flexible and
useful table sorting/striping/row-selecting library around.
Big features:
Single and multiple-level sort
Arbitrary sort criteria (IP address, date, etc.)
Works with table headers that are > 1 row or column large
Stripe tables and/or enable row selecting
Row selecting supports drag-select and SHIFT-click
No extra
2006 Jun 21
6
vertical menus
Hello all,
Not a directly related question to scriptaculous or prototype, but I
am looking for a good, dynamic vertical javascript menu.
I''ve done some searching and there are a lot of menu implementations
out there. I''m looking for something more or less free, but will
pay/donate a small fee towards something worth while.
I figured I''d ask here to help filter down
2009 Dec 16
5
Caching comments: timestamps and subdomains
Hi,
I''m working on a website that has a very slow loading frontpage. I
wanted to start by caching certain elements that have high load. For
example, it loads the last 50 comments, along with the corresponding
usernames, avatars and more. So I cached that fragment and created a
sweeper that observes Comment and expires after every create or
destroy action.
However, I have two problems:
2007 Sep 04
4
Could someone take a look at #9477 (new fieldset_tag helper)?
Hi everyone,
I just submitted a patch for a new fieldset_tag helper.
It''s helpful and encourages developers to follow web standards, etc.
"+1"s welcome :-)
http://dev.rubyonrails.org/ticket/9477
Cheers
Damian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
2006 Apr 28
8
Effects fully display before effect
Why do effects that display an element (like Appear or Slide Down) start by
displaying the element for a split second and then make the element
disappear?
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
2005 Sep 19
9
Rails compatible JS datepicker -- beta
hi all,
I''ve built a simple javascript datepicker for use with Rails. I''m sure
others exist, but think this one is quite decent without being
overengineered.
http://projects.exactlyoneturtle.com/date_picker/
At present there''s no Rails HTML generator method for it; later I will
package it in a script/generator, but for now it is quite easy to use with
Rails and
2006 Apr 03
4
Clearing out filters in ActionController
I want to run a single filter in my application.rb file, and then if a
certain condition is true, end the action''s processing immediately.
Right now I''m using prepend_before_filter to ensure that it gets run
first, but some of my around_filters are still being processed. Is
there a way that I can clear out all the filters that should be run?
Basically it''ll look