Displaying 20 results from an estimated 1000 matches similar to: "What's the good way to cache reference data?"
2006 Jan 17
10
ActiveRecord + memcache = cached_model
Courtesy of The Robot Co-op.
$ yes | sudo gem install cached_model
Or, you can download cached_model and memcache-client (our zippy-fast
memcache library, required) from:
http://rubyforge.org/frs/?group_id=1266
I don''t have the README posted for making cached_model work online
yet, so here it is:
= CachedModel
Rubyforge Project:
http://rubyforge.org/projects/rctools/
== About
2006 Nov 16
1
Strange indexing issues with CachedModel, STI, and AAF
I started using robotcoop''s CachedModel class in my project but have encountered problems when using it with the acts_as_ferret plugin. It seems it doesn''t index everything in my STI model, also if I do a search from my base STI class I get a result count but no results. If I run the same search from one of the children STI models I get the appropriate results (if the information
2006 Jan 30
0
cached_model-1.0.1 ActiveRecords + memcache
The new version of cached_model features bug fixes and tests!
Bugs fixed:
Updating a model no longer stores associations into the cache. This
could cause strange, hard-to-debug bugs when an invalid set of
assocations was retrieved along with a cached model.
Reloading a model refreshes the cache.
When CachedModel::find can''t understand query params and a single
result is
2006 Feb 12
3
memcache-client/cached_model help
Hi -
Just downloaded and installed the memcache-client and cached_model
gems and am trying to test it out on a development setup. I added
this to my environment/development.rb
CACHE = MemCache.new :c_threshold => 10_000,
:compression => true,
:debug => true,
:namespace => ''eztrip'',
2006 Mar 28
12
cached-model broken with Rails 1.1
It looks like cached-model is broken again under rails 1.1. Can anyone
confirm? Note that the exception below indicates it''s trying to treat
CachedModel as the class name of the model, rather than using the proper
class name (which is Entry in this case, and the table called entries).
This is a model using Single Table Inheritance and acts_as_tree, and
worked just fine under 1.0 and
2006 Jan 30
1
find_by_sql and memcached
Is a find_by_sql query cached with memcached and cached_model
(http://dev.robotcoop.com/Libraries/)? Looks like the answer is no. Is
there a reason for this? I have a lot of very complicated querys with a
lot of unions, subquerys and joins that would greatly benefit from the
cache.
Going through the code I can see that the find_by_sql method is changed
in cached_model.rb, but it does not call
2006 Mar 01
4
cached_model and memcache-client slowness
Hi there,
I''ve got a Rails app that''s a little unusual in that it maintains a
database representation of a filesystem (for an image gallery). Thus, if
the filesystem is essentially ''out of date'' then the controller''s list
action will end up invoking a model update (which involves a filesystem
scan).
I''m using sqlite3 as this app will be
2006 Feb 13
1
CachedModel anyone?????
Can any one help explain this output in my log. I have memcache-client and
cached_model setup for a model City but when I run my app, this is the
output I get (this is on a second pass so theoretically the data is already
in the cache).
MemCache Get (0.000469) active_record:City:1802387
City Load (0.001015) SELECT * FROM cities WHERE (cities.id = 1802387)
LIMIT 1
MemCache Set (0.000776)
2007 Sep 15
1
ANN: [Yet Another ] AJAXy Petstore
Hi all,
It''s obvious (isn''t it?) that the world needed another Petstore.If
it''s not, then let''s just say that for some esoteric reasons (to do
with training and the JRuby project), some people in ThoughtWorks
decided to create one, anyway. With rounded corners, gradient fills,
autocompletion search, yellow fade effect and sundry Web 2.0
features... but no tag
2008 May 06
4
Git support - kinda works, have design questions
As of now, I can create a project from Git repository, run a builder
on it, and even run the dashboard. Build pages look ugly because
build.label in git is very long, a bunch of unit tests is failing, and
I had to disable some functionality, namely displaying source control
errors in the dashboard.
SourceControl::AbstractAdapter#execute_with_error_log (formerly known
as
2006 May 02
6
Performance suggestions or best practices ideas?
Any suggestions on applications that involve alot of calcualtions on a
fairly large data set?
My app uses a set of raw data ~5k, applies some default/override rules
on the raw data and does some calculations on the data in combination
with a list of assumptions. A ranked list along with detailed metrics
is generated. The end user can manipulate some of the rules and
assumptions to generate
2008 Feb 07
2
[CruiseControl] RubyOnRails build 8820 fixed
The build has been fixed.
CHANGES
-------
Revision 8820 committed by bitsweat on 2008-02-07 23:10:01
Remove empty .rhtml templates
D /trunk/actionmailer/test/fixtures/templates/signed_up.rhtml
D /trunk/actionmailer/test/fixtures/helper_mailer/use_example_helper.rhtml
D /trunk/actionmailer/test/fixtures/first_mailer/share.rhtml
D
2006 Feb 23
2
Calgary Ruby Users Society (CRUSERS)
Calgary Ruby Users Society (otherwise known as Association of Anonymous
Java Programmers, Calgary branch) had it''s first meeting today. After a
round of introductions, we discussed our interests and brainstormed
possible activities for the group. Paul Rogers did a presentation on
Watir [http://wtr.rubyforge.org/]. Watir is not just a great tool, but
also a way to sneak Ruby into your
2006 Feb 01
7
Explanation of "alias_method"
Hi!
I''m trying to extend ActiveRecord''s find method (Rails 1.0, Ruby 1.8.2),
but I recognize a strange behaviour of the "alias_method" call.
I wrote a very simple script to explain my problem:
------------------------------------------------------
module ActiveRecordExtension
def self.included(base)
base.extend(ClassMethods)
base.class_eval do
2008 Jan 26
6
UI Integration with RSpec?
Hi all,
Is there any integration with testing tools such as RSpec or
Test::Unit planned? I see that the cruise task is run correctly, but
the tests show up underneath the build log. Ideally I''d like them to
show up the same way that they do in ''java'' CruiseControl, in their
own section of tests.
Will.
2008 Mar 12
5
XHTML validation
Is the dashboard output of 1.2.1 supposed to validate (I get numerous
failures)? I''m seeing some issues that I hadn''t been running into
before my upgrade. The first time I load the dashboard I''m seeing a
blank area at the top and first button isn''t styled. When the refresh
triggers the all of the projects except the first are duplicated and
the
2006 Feb 17
4
Table with Constants
I would like to have a table with some constants to use them later on
for a drop down menu. How can this be done?
My table looks like
Table with constants
------------------------
id | key | value | type
------------------------
1 | M | Male | sex
....
I know it can be done like this
<% select ''object'', ''method'', Constants.find(:all, :select =>
2007 Nov 22
7
Gentoo warning
Hi,
I''ve done some benchmarking on our new servers (being built now), AMD X2
5600, gentoo-hardened.
With the same CFLAGS (safe cflags: -march=k8 -O2) I''ve tested the following
configs:
1, emerge ruby rubygems, then gem install mongrel (or emerge mongrel, the
performance was similar)
2, download the same ruby version, untar, ./configure, make, make install,
download rubygems,
2008 Jan 17
3
CruiseControl problem. Broken Pipe?
Hi Friends,
Just happened to catch this err in the CC log:
Build loop failed
BuilderError: Write failed: Broken pipe
./script/../config/../app/models/subversion.rb:98:in
`execute_in_local_copy''
./script/../config/../lib/command_line.rb:86:in `call''
./script/../config/../lib/command_line.rb:86:in `e''
./script/../config/../lib/command_line.rb:84:in `popen''
2007 Nov 05
29
Mongrel and memory usage
Hello,
I''m running a Rails application which must sort and manipulate a lot of data
which are loaded in memory.
The Rails app runs on 2 mongrel processes.
When I first load the app, both are 32Mb in memory.
After some days, both are between 200Mb and 300Mb.
My question is : is there some kind of garbage collector in Mongrel?
I never see the two Mongrel processes memory footprint