Displaying 20 results from an estimated 5000 matches similar to: "expire_fragment problem"
2006 Jan 10
6
Can we cache user home pages?
Hi Railers,
I am trying to create a simple application like a guest book which has users
and uses sessions to keep track of
which users are logged on. The user''s page is constructed after doing some
SQL queries and the user clicks on another link and hits the back button I
dont want to regenerate the whole page (which is what happens now) .So I
want to use some kind of caching mechanism.
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:
2009 Feb 18
4
expire_fragment with memcached
Hello all,
We know that memcached or memcached-client doesn''t support regex... But
It seems it doesn''t support expire_fragment either :/
I''m trying to use expire_fragment with memcached as following :
expire_fragment(:controller => ''home'', :action => :list_posts)
But apparently it''s not supported by memcached :
RuntimeError (Not
2005 Nov 04
1
expire_fragment outside of a controller
I am trying to figure out a way to call the
expire_fragment outside of a controller. I need to
expire some fragments on a hourly basis. I have a
Thread that every hour that will perform a task. The
expire_fragment is located in the module
ActionController::Caching::Fragments as an instance
method.
Do I need to mixin the model
ActionController::Caching::Fragments into my class?
Or is there
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
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:
2005 Dec 28
3
acts_as_taggable query
Hi ,
I couldnt find any mailing list for this nice plugin so I hope this is not
off topic.I just have a basic question here.
I already had created a table and a model for the tags and items and the
join table and now want to use this plugin but I just cant seem to figure
out how to make it use my table instead of the default.
class Tag < ActiveRecord::Base # already exists and has the
2006 Oct 10
1
A few quick fragment cache questions
Doing some reading up on fragment cache before implmenting it and had a
few questions:
1.) I read that page and action caching have issues or don''t work at
all with query strings (more so with page caching). Does fragment
caching work with query strings? i.e something like
example.com/foo/bar?page=2
2.) If the above is true and I have an authentication system built
into my app, if 2
2008 Nov 13
1
Fragment caching strangely honors the options I pass to it
Hi,
In my view I have the following cache:
<%- cache(:controller => ''products'', :action => ''index'', :action_suffix
=> ''footer'') do -%>
...
<%- end -%>
And that''s the file generated:
tmp/cache/views/www.mysite.com/products.action_suffix=footer.cache
Why isn''t fragment caching picking up the :index
2006 Nov 04
0
#expire_fragment in models...any clean solutions?
I''ve seen a couple of workarounds on the mailing list related to
expiring cached fragments inside of models, but nothing too clean.
Anybody have any suggestions for handling this at the model-level? I
have an application is updated outside of the Rails controllers, so I
can''t use a Sweeper.
The 2 methods I''ve seen:
a. Use a callback to generate an HTTP post on a
2006 Jan 15
2
What mode does Apache/Rails start in?
Hi ,
I am using Rails with APache on FC3. While I can control the mode in which
rails starts using WEBrick.How do I make APache start in one of the
dev/production modes.?
Vivek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060115/b823481f/attachment.html
2006 Jan 16
6
the competition?
The ''gmail'' video seems really interesting:
http://www.morfik.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060116/385e77f0/attachment.html
2006 Mar 07
2
(newbie) Accessing the pieces of a 'by' object
Folks,
I know that I can do the following using a loop. That's been a lot
easier for me to write and understand. But I am trying to force myself
to use more vectorized / matrixed code so that eventually I will
become a better R programmer.
I have a dataframe that has some values by Year, Quarter and Ranking.
The variable of interest is the return (F3MRet), to be weighted
averaged within the
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)
2006 Jan 12
3
ActionMailer bug?
Hi ,
I have actionamailer working properly with a template and a model for
creating the mail object etc. The whole thing works correctly if I use
Webrick.but when I use it on Apache,i get the error which says "template
missing".rails is unable to find the template for the mailer
object.Hasanyone noticed this?
Vivek
PS:I am still not using the 1.0 version
-------------- next part
2006 Jan 19
4
Using RoR pluralization rules
Hello,
RoR seems to be aware of plurals like category=>categories etc..I Want to
be able to use this in my application to relate some keywords.Is it possible
?or does RoR itself use some ruby library?
Thanks
Vivek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060119/d5660663/attachment.html
2006 Feb 19
8
SwitchTower to skip config/ directory
Hello,
I am trying to figure out how to use switch tower.I have a local copy of
source code and I want to put it on the host.Now I dont want to put
directories like config/ because the settings on the host and the one on my
machine are different.
Any way to do this?
Also is svn necessary to use SwitchTower?
Vivek
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Jan 03
2
Rails is slow on Apache !!!
Hi ,
I have rails running on my development machine. I have installed mod_ruby
and set up the httpd.conf file to add handlers for .rb files. But the speed
I get is still slow compared to webrick which is blazingly fast.
I have 2 questions
1. How do I determine if mod_ruby is loaded and is being used to run my ruby
scripts ?
2. Which of these fcgi /mod_ruby is faster ?
Thanks
vivek
--------------
2006 Jan 06
3
Countries -> Cities Select box
I am trying to play with a Countries -> Cities dynamically updating select
box.that is if someone selects a country then all the cities of that
country must be listed.Does anyone know of any data source for this?
I searched for it but couldnt find any good usable source.
Better still is there a module which I can mixin for this?
Thanks
Vivek
-------------- next part --------------
An HTML
2006 Nov 04
0
Net::HTTP.post_form got 200 but no INSERT INTO. How come? How to fix this?
Hello,
I''m playing around with net/http and open-uri Ruby Libraries.. I''m
trying to post to my own rails simple new action method.
Here''s my irb :
irb(main):013:0> res =
Net::HTTP.post_form(URI.parse("http://localhost:3002/blog2/new"),
{"commit" => "Save",
"signature_id" => "", "signature_content"