Displaying 20 results from an estimated 1000 matches similar to: "find_by_sql and memcached"
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 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 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 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 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 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 Aug 14
1
What's the good way to cache reference data?
I''m looking at an application that has 30+ lookup tables. By that I
mean your typical (id, description, created_on) affairs that contain
locations, zip codes, contract types and what not. Things that rarely
change, and are maintained by administrators.
It''s well known that when you have many lookup tables in the schema,
eager loading is not good enough anymore, and you need to
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 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
2006 Jan 20
2
The New Memcache ?
Hey All !
I ended up browsing to Eric Hodel''s blog the other night, and found his
entry about the new cache_model and memcache-client.
Now, it looks like it''s "officially" out in the open:
http://weblog.rubyonrails.com/articles/2006/01/20/caching-models-with-memcached
In my application, I''ve been staying away from caching my models, and
instead just doing
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
2007 Jan 30
0
No reaction from memcached
I''ve been following the instructions here http://nubyonrails.com/
articles/read/716 on how to get started with memcached.
Starting up ./script/console production I get at couple of deprecation
warnings:
<snip>
./script/console production
Loading production environment.
DEPRECATION WARNING: model is deprecated and will be removed from
Rails 2.0 See
2006 Jan 21
2
Testing ActiveRecord associations
How do I write a test which proves something like "Post :has_many
Comments" and "Comment :belongs_to Post"? It doesn''t seem to be covered
in "A Guide to Testing the Rails" on manuals.rubyonrails.com.
Cheers, Robert.
--
Posted via http://www.ruby-forum.com/.
2005 Dec 16
11
mysql mem-tables vs. memcached
Could someone please elaborate on the technical differences and practical
impact of whether choosing memory-based tables in MySQL or using memcached.
I got this far on my own:
It seems that MySQL uses the NDB engine for transaction-safe memory access
in a cluster. the memory storage engine seems to be faster but not
synchronizable by any means in a cluster. memcached seems to be ultimately
fast
2006 Oct 17
5
Memcached Server - Memory Consumption
I was just testing the memcache server on a Windows box and had set it
up as a Windows Service and to my surprise (or my shock really) it was
using 47+ meg of ram with no data even loaded in it yet. Has anyone
else used the Windows port of memcached for their Rails projects and if
so how much ram was it using?
Does memcached use less memory on Mac OS X or Linux than Windows?
Thanks for any
2006 Apr 19
1
session memcache
hi all
how to handle session expire time in memcache
regrads
--
Posted via http://www.ruby-forum.com/.
2006 May 15
6
Getting Net::IMAP to work with PLAIN auth type...
Hi there,
I''m new to rails and I''ve been successful tinkering around but
am miffed by the process of trying to connect to my mail server to receive
email for ActiveMailer parsing. I''m hosted on TextDrive and have read the
following article on the RubyonRails wiki:
http://wiki.rubyonrails.com/rails/pages/HowToReceiveEmailsWithActionMailer.
I want to
2006 Jan 21
19
RoR - Mac OS 10.4.4 on Intel
I got a new 20 inch iMac dual core today and am busy getting it all
setup. A couple of issues though:
1. Is the Ruby 1.8.2 install by Apple still botched or has that been
fixed? I recall someone had fixed the rbconfig.rb to get it working.
Is this something I still have to do?
2. Does anyone know if Locomotive is using the uniersal binaries, or is
it targetting PPC yet? I couldn''t
2006 Feb 19
8
require ''digest/md5'' not working on Mac or Windows
I''ve tried the following line in ruby script/console
require ''digest/md5''
Both my Mac (Intel iMac) and my Windows box return "false"... Any ideas
what could be wrong? I was trying to do the RoR Recipe on page 54 of
Chad Fowler''s new (beta) book.
-Mark
--
Posted via http://www.ruby-forum.com/.
2011 Apr 27
3
Can't configure cach_store in an initializer
I''m trying to use redis-store as my cache_store. I also have an
app_confirg.rb initalizer which loads a yaml file for config settings.
In my redis.rb initializer I have:
MyApp::Application.config.cache_store = :redis_store,
APP_CONFIG[''redis'']
However, this doesn''t appear to work. If I do Rails.cache in my rails
console I can clearly see it''s using