Displaying 20 results from an estimated 30000 matches similar to: "all-but-fragment caching suggestion"
2007 May 29
4
cache everything but...
I saw this older post when searching for information:
On Feb 16, 5:10 pm, Ingo Weiss <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:
> withfragmentcachingonecancacheparts of a page. However, more often
> than not what I would need is the exact opposite approach. I would like
> to be able to use action cashing and have a mechanism for telling Rails
> to
2006 May 04
1
Problem caching XML files
Hi,
When I turn on action cashing for actions that render as XML using
builder templates, the files are cashed with an .html extension, and
subsequently served as html which breaks things.
Is there a way to cache files with an .xml extension?
Ingo Weiss
--
Posted via http://www.ruby-forum.com/.
2006 Aug 18
1
Fragment Caching
Hello.
I wouldn''t mind getting some feedback about the use of fragment
caching. I''ve got a series of relatively expensive database queries
with their respective partials cached and everything is working fine.
The problem is that do get this to work I''ve had to move the database
queries from the controller into the view layer so as to avoid them
being called if the
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
2006 Aug 25
1
Time based fragment caching plugin
I''ve written a plugin to allow for time based fragment caching. It lets
you do things like:
<% cache ''fragment_name'', 10.minutes.from_now do %>
<p>something intensive which will be cached for 10 minutes</p>
<% end %>
Also, there''s a convenience method so that in your controllers you can do:
when_fragment_expired
2007 Mar 22
1
doable ? action caching if anonymous, fragment caching if logged in ?
Hi All,
I''d like to use different caching strategies based on the visitor status
- anonymous => action caching
- logged in => fragment caching
Is that doable? Where should I start?
TIA
Alain
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this
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
2008 Oct 03
1
fragment caching with search box
I''m trying to setup some fragment caching which works fine for the index
but i''m not sure how to ignore the caching if they are searching the
index results.
my code in short:
ItemsController
def index
@items = Item.search(params[:search], params[:min_rank],
params[:max_rank], params[:classification_id], ...)
end
index.html.erb
<% cache (''items'',
2009 Jun 11
1
fragment caching file_store problems
Hello,
I''m having problems on both my production and development servers with
fragment caching.
Every time I try to cache something using <% cache do %>, I get the
following error:
Couldn''t create cache directory: views/0.0.0.0:3000/jobs/106/questions/
174 (wrong number of arguments (2 for 1))
but strangely, all of the directories apart from the last one are
created.
2007 Mar 09
0
Does Bdrd 2.x handle fragment caching still?
From the API I was unable to determine if the new architecture for
BackgrounDRB still handles fragment caching? If so, how can I use it?
I am upgrading to the new architecture from the old one and used this
functionality in the old code base.
I like the new architecture, thank you.
Cheers,
Matt
2006 Jan 21
3
Fragment caching with Memcached slow?
Hi,
I am trying to do fragment caching using :mem_cache_store. However, when I
compare it to fragment caching using :file_store, it seems to be a lot
slower.
Here are the results:
uncache
Completed in 2.20246 (0 reqs/sec) | Rendering: 2.19891 (99%) | DB:
0.00017(0%) | 200 OK [
http://127.0.0.1/]
using file_store
Completed in 0.00952 (105 reqs/sec) | Rendering: 0.00702 (73%) | DB:
0.00000(0%)
2006 Aug 07
0
Rails fragment caching bug?
<% cache(:part => @user.id) do%> in the file controller => users, action
=> show.
Regardless if you put the action so it ends up as <% cache(:action =>
''show'', :part => @user.id) do%> or the controller, the file will come
out in "tmp>cache>`SERVER`>users>show>1.part=userid#.cache . Which is
fine except for the 1 in the cache
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
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
2006 May 29
4
Time-based cache fragment expiration
Hello,
I''m trying to figure out how I could implement fragment caching that
expires every x amount of time. I thought of writing a runner script
that would expire the cache and set it as a cron job, but that
doesn''t really work because runner scripts act on models and not
controllers.
Does anybody have any ideas?
Regards,
-carl
2006 Jun 19
0
Expiring fragment cache when multiple domains point to the same app?
Hi All,
We have four domains setup for The Couch: thecouch.org.nz,
thecouch.co.nz, www.thecouch.org.nz and www.thecouch.co.nz. They are
all handled by the same rails app. The means that fragment caching
creates four folders in our cache directory, named after each URL.
This introduces two problems:
1: We are caching 4 times as much stuff as necessary
2: Our cache sweepers are only sweeping one
2006 Jun 19
0
Help: Expiring fragment cache across multiple domains
Hi All,
We have four domains setup for The Couch: thecouch.org.nz,
thecouch.co.nz, www.thecouch.org.nz and www.thecouch.co.nz. They are
all handled by the same rails app. The means that fragment caching
creates four folders in our cache directory, named after each URL.
This introduces two problems:
1: We are caching 4 times as much stuff as necessary
2: Our cache sweepers are only sweeping one
2008 Sep 15
0
Caching RJS fragments
Do you have any hint for using fragment caching within a RJS response?
I''ve the following piece of code in a rjs template
for hotel in @hotels
cache(:id => hotel.id, :format => params[:format]) do
page.insert_html(:bottom, :items, :partial => hotel, :locals =>
{ :city => @city, :country => @country })
end
end
but when the response is rendered it returns the
2006 Apr 20
12
memcache, sessions, fragments, oh my!
Hi all -
I am trying to get rails to use memcache for sessions and fragment
caching. I''d also like to use the same connection for general caching of
this and that.
I''m following the instructions here:
http://wiki.rubyonrails.com/rails/pages/HowtoChangeSessionStore
and hitting a brick wall.
I''m using the new memcache-client since from what I''ve read
2007 Jan 25
0
Fragment Cache in ActionMailer
I have a controller which iterates through a group of people and
dynamically generates an email for each person, it is a bit DB heavy so
caching would really help.
Adding ''include ActionController::Caching::Fragments'' to my
BookingMailer model produces this error:
ActionView::TemplateError (undefined local variable or method
`perform_caching'' for