Posts for: #Memcached

Cached Models 0.0.3

Since I began to work as professional developer I learned a lot of stuff, but, first of all I learned to be honest with customers and with the Community. I have to admit: CachedModels 0.0.2 was a huge mess.

It was a broken version, due to wrong mocks in test. I apologize for all the problems you could encountered using it. Since I discovered all the errors, I worked hard to restore all the lost functionalities. But it wasn’t enough for me, so I focused my attention on performances, reducing cache accesses: now benchmark test tooks 36.015132 fewer seconds than plain ActiveRecord!

[]

Cached Models 0.0.2

CachedModels hit 0.0.2.

First of all, I transformed it to a Ruby gem, so you can use it outside Rails! Second, I dramatically enhanced performances, avoiding useless cache lookups and expirations. Take a look at the new benchmark stats: 1000 requests with a level of concurrency equal to 100, tooks 6 fewer seconds, if compared with standard ActiveRecord.

I strongly encourage you to upgrade to the newer version.

[]

Cached Models

cached_models provides to your models a transparent approach to use Rails internal cache mechanism.

Usually, when you decide to use cache for your ActiveRecord results, you have to manually implement complex expiring policies. cached_models simplifies your code:
class Author true end

class Post true end

That’s all!!.

A more complex example..
class Project true

has_many :tickets, :cached => true has_many :recent_tickets, :limit => 5, :order => ‘id DESC’, :cached => true end

[]