Displaying 20 results from an estimated 2000 matches similar to: "tracking latency in rails"
2007 Jan 22
2
caches_action :index for site root gets propagated to lower levels (how to stop?)
Hello all,
I am running a blog system which has its "/" (home page) cached like
this:
class ApplicationController < ActionController::Base
before_filter :index_cache_expirer, :only => [:index]
caches_action :index
so the site''s top page is caches for 60 seconds in my case
(index_cache_expirer is a home-made function to expire)
on the site, there is also a
2008 Sep 24
3
caches_page :if not executing (but caches_action :if) does
Hi folks -
Seeing a weird problem and would love some help. It''s documented in
http://pastie.org/278310 to be more readable.
In short, I have a
caches_page "action", :if => {stuff}
but the :if is never being called - the action is just caching every
time. (If I put a debugger call in the :if block, it never stops.)
If I replace caches_page with caches_action, the if
2006 Feb 13
3
caches_action does not go off the entire URL
I am trying to use caches_action and the agile book says that it is keyed
off the URL, however it does not seem to pick up the URL parameters.
http://localhost:3000/controller/action/id?foo=bar
and
http://localhost:3000/controller/action/id?foo=foobar
Returns the same page.
Anyone looked into how to add URL parameters to the cached key? Also,
where do those file get stored?
Thanks
Dave
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
2007 Feb 03
1
How can I bypass caching for some users
I have action caching setup for several actions of an application but I
want the caching to only run for my administrators and have all other
users see non-cached pages. Is there a way to do this? Perhaps
something like passing a block to caches_action or setting some sort of
flag in my authentication method? If this is not possible with action
or fragment caching does anyone know of a
2005 Mar 24
3
Caching computation in rails?
Caching computation in rails?
Simple example: factorial modulus a large number
input: integer x
output: factorial( x ) % 12345678901234567
I want it so that if it computes factorial of N once, it will not have
to compute for N again.
code:
class SiteController < ApplicationController
caches_action :factorial, :inv
def examine
@inv = @params[''inv'']
@outv =
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 Mar 26
2
Calling a controller action from script/console or runner
Is there a way to call or invoke a controller method from script/console
or script/runner? The reason is that I''d like to pre-cache some of the
actions on my controller.
The pseudo code below is what I''d like to be able to do:
class MyController < ApplicationController
caches_action :test
def test
puts ''Hi there''
end
end
script/console:
2009 Nov 12
0
[PATCH 03/12] Btrfs: Rewrite btrfs_drop_extents
Rewrite btrfs_drop_extents by using btrfs_duplicate_item, so we can
avoid calling lock_extent within transaction.
Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
---
fs/btrfs/ctree.h | 7 +-
fs/btrfs/file.c | 659 ++++++++++++++++++++-------------------------------
fs/btrfs/inode.c | 27 +--
fs/btrfs/ioctl.c | 3 +-
fs/btrfs/tree-log.c | 4 +-
5 files changed, 277
2006 Aug 23
0
Caches_action/ before_filter problem .
Hello, I have a method called "check_permission" that is set to run as a
before_fitler and which checks if a user has the authorization to view a
page.
This page is displayed through the method "show" which is cached through
the tag "caches_action :show"
My problem is that once a user with authorization to a page accesses it,
then afterwards all users (with or
2010 Oct 23
3
Why such high latency on internal lan?
My internal lan is small, 100mb, all wired. aastra phones.
sip show peers
.......
142/... 10.10.10.42 D A 5060 OK (136 ms)
144/... 10.10.10.44 D A 5060 OK (138 ms)
145/... 10.10.10.45 D A 5060 OK (133 ms)
But pings are < 1ms:
ping 10.10.10.42
........
rtt min/avg/max/mdev = 0.479/0.483/0.497/0.021 ms
Why are the sip latencies so
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''
2012 Dec 14
1
Re: Digest for rubyonrails-core@googlegroups.com - 4 Messages in 3 Topics
This is a delivery failure notification message indicating that
an email you sent could not be delivered. The problem appears to be :
-- Recipient email server rejected the message
This condition occurred after 1 attempt(s) to deliver over
a period of 0 hour(s).
If you sent the email to multiple recipients, you will receive one
of these messages for each one which failed delivery, otherwise
2006 Jan 19
1
Caching suggestions
Hi ,
I have created a simple app which allows user logins and when user logs in
a home page is shown which is built using some queries to the DB. I tried
caching which didnt work properly because for some reason rails kep loading
the old cache..Anyway What I was wondering is caching only avoids the render
process but IMHO the queries are the most consuming.
My code is something like
def index
2006 May 07
0
caches_action and render_component
I''ve made some test:
------------------ CODE ------------------
class FooController < ActionController::Base
caches_action :foo
def foo
render_text ''Hello, foo<br />''
end
end
class BarController < ActionController::Base
def bar
render :inline => <<-EOS
Hello, bar <br />
<%= render_component(:controller =>
2006 May 31
1
Using caches_action ?
Hi
When I enable action caching in my controller with
caches_action :view_thread
only the first part of my layout template is rendered (up to the yield
statement), and the development.log shows
Processing ForumController#view_thread (for 127.0.0.1 at 2006-05-31
03:13:19) [GET]
Session ID: d6f7ef15f479250fd7e31e252d70f5ff
Parameters: {"action"=>"view_thread",
2006 Mar 12
0
Conditional Action Caching?
I have a system that requires login. This is for administrative
purposes, so the pages will be the same as the public ones, except they
will have the edit|delete|new options.
Right now, I have:
caches_action :index
which works great, but I''d like:
caches_action :index unless user?
where user?() is defined in application.rb.
I get an exception using this construct. Can anyone help?
2012 Jan 27
2
to_json performance
Originally posted on github, reported to the right place.
I would like to open a discussion about how `to_json` and `as_json`
operates in Rails from a performance standpoint.
I''m using Rails 3.2 but this issue applies to almost all versions of
Rails.
Our use case presents the challenge in sending out potentially large
JSON (or XML, but we''ll focus on JSON rendering here)
2010 Oct 21
1
Why high latency on internal lan?
I have a 100MB internal lan. aastra's are wired. asterisk box is wired
next to the switch. But look:
sip show peers
........
142/142 10.10.10.42 D A 5060 OK (137 ms)
144/144 10.10.10.44 D A 5060 OK (136 ms)
145/145 10.10.10.45 D A 5060 OK (168 ms)
150/150 10.10.10.50
2016 Jan 04
2
variable instruction latency using itineraries
It it possible to specify an instruction latency in the itinerary through a
command line option? We have several options for a hardware divider which
have different latencies and it would be nice if I could specify it through
a compiler option rather than changing the value in the code and
recompiling llvm every time?
Any help is appreciated.
--
Rail Shafigulin
Software Engineer
Esencia