search for: cachedmodel

Displaying 13 results from an estimated 13 matches for "cachedmodel".

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 mode...
2006 Jan 17
10
ActiveRecord + memcache = cached_model
...bot 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 CachedModel stores Rails ActiveRecord objects in memcache allowing for very fast retrievals. CachedModel uses the ActiveRecord::Locking to ensure that you don''t perform multiple updates. == Using CachedModel Firs...
2006 Feb 13
1
CachedModel anyone?????
...t (0.000753) active_record:City:1802387 MemCache Set (0.000755) active_record:City:1802387 So it appears to get the object from the cache and yet appears to query the dabase again and then set the object into the cache 3 times in t row??? I see this behavior no matter what model I extend from CachedModel so it''s not just this particular model object that does this. Thanks Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060213/d863b31b/attachment.html
2006 Jan 30
0
cached_model-1.0.1 ActiveRecords + memcache
...sion 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 returned from ActiveRecord::Base, that record now refreshes the cache. = CachedModel Rubyforge Project: http://rubyforge.org/projects/rctools/ Documentation: http://dev.robotcoop.com/Libraries/cached_model/ == About Cach...
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 under edge_rails as of a few weeks ago. SQLite3::SQLException:...
2006 Feb 12
3
memcache-client/cached_model help
....0.0.1:11211'' session_options = { :database_manager => CGI::Session::MemCacheStore, :cache => CACHE, :session_domain => ''www.eztrip.com'' } ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update session_options I also changed a few models to extend CachedModel but am having trouble getting it to work. I can manually put things in the cache and take them out of memcached but when I use cached_model on my home page I get this in my console: MemCache Set (0.091822) active_record:EntityType:1 MemCache Set (0.190003) active_record:EntityType:2 MemCache Se...
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
2007 Aug 14
1
What's the good way to cache reference data?
...wn that when you have many lookup tables in the schema, eager loading is not good enough anymore, and you need to cache them in memory as ready-made objects, to avoid abusing the database. Looking for an available Rails solution I came across http://dev.robotcoop.com/Libraries/cached_model/classes/CachedModel.html Is it the good way to do this? Are there other choices worth looking at? Should we roll our own? NB: Yes, I know about ActiveRecord:Base.cache(), and it doesn''t solve this problem, not in our case. -- Alexey Verkhovsky CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com] Rub...
2006 Nov 21
5
acts_as_ferret with STI models
Can acts_as_ferret search only one of the inherit models in the hierarchy of STI models? Say you have Contents, with types articles and comments. I know that you do Contents.find_by_contents, but can you also create indexed for Comment and Articles? Thanks for you help Miguel -- Posted via http://www.ruby-forum.com/.
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 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/.
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 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