search for: cached_model

Displaying 16 results from an estimated 16 matches for "cached_model".

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...
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 ca...
2006 Mar 01
4
cached_model and memcache-client slowness
...scan). I''m using sqlite3 as this app will be deployed in an environment where having a standalone app, easily launchable via Locomotive, will be necessary, but the server will not be under really high load. Anyways, to try to speed up the database reads I made my models subclasses of cached_model, and set up memcached. It''s clearly working, as I see the gets and puts in my log. However, cached_model and memcached have if anything slowed everything down. I''m still seeing SQL queries that seem extraneous. For example: Rendering gallery/browse MemCache Get (0.182419) ac...
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'...
2008 Sep 11
1
cached_models
Hi all, Yesterday I released a new Rails plugin: cached_models. It allows to transparently use the internal Rails cache mechanism in your models, avoiding to write code for expiring policies. Example class Project < ActiveRecord::Base has_many :developers, :cached => true end class Developer < ActiveRecord::Base belongs_to :project, :cached =&...
2006 Mar 28
12
cached-model broken with Rails 1.1
...me 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: no such table: cached_models: SELECT * FROM cached_models WHERE (parent_id is NULL) LIMIT 1 RAILS_ROOT: public/../config/.. Application Trace | Framework Trace | Full Trace /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/connection_adapters/abstract_adapter.rb:120:in `log'' /usr/local/lib/r...
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 cac...
2007 Jan 30
0
No reaction from memcached
...caching is taking place. I get no output from my memcached-process, nothing in the rails logs and nothing on the console says anything about caching. I guess that I have a config error somewhere or a version mismatch. Here''s what I have at the end of environment.rb require ''cached_model'' CACHE = MemCache.new ''localhost:11211'', :namespace => ''my_rails_app'' I''ve also tried these settings with the same result: require ''cached_model'' memcache_options = { :c_threshold => 10_000, :compression => true...
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...
2007 Aug 14
1
What's the good way to cache reference data?
...t''s well known 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.t...
2006 Nov 16
1
Strange indexing issues with CachedModel, STI, and AAF
...ss FirstRecord < Record end class SecondRecord < Record end class ApplicationController < ActionController::Base after_filter { CachedModel.cache_reset } end Here''s my CachedModel setup: - config/environment.rb: # Include your application configuration below require ''cached_model'' CachedModel.use_local_cache = true - config/environments/development.rb (last line) CACHE = MemCache.new ''localhost:11211'', :namespace => ''ohio_development'' - config/environments/production.rb (last line) CACHE = MemCache.new ''localhost:11...
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
2009 Jan 05
1
packet_worker_runner error
...tialize'' from /home/antz/declix.com/production/script/backgroundrb: 42:in `new'' from /home/antz/declix.com/production/script/backgroundrb:42 My gem list : actionmailer (2.2.2) actionpack (2.2.2) activerecord (2.2.2) activeresource (2.2.2) activesupport (2.2.2) cached_model (1.3.1) cgi_multipart_eof_fix (2.5.0) chronic (0.2.3) daemons (1.0.10) fastthread (1.0.1) file-tail (1.0.3) gem_plugin (0.2.3) hoe (1.8.2) hpricot (0.6.164) mechanize (0.9.0) memcache-client (1.5.0) mysql (2.7) nokogiri (1.1.0) packet (0.1.14, 0.1.5) passenger (2.0.6) postgres (0.7.9.2008.01.28) ra...
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 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
2006 Jul 29
29
Dynamically generating 10k pages per second
Hi, Anyone got an idea of how many web and database servers I''d need to push out 10,000 dynamic pages per second? Fairly simple pages and database queries. I''d appreciate recommendations for hardware. The clients for this project are anticipating large amounts of burst traffic. Joe