maccman / supermodel

Ruby in-memory models

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Redis Model ID Key Without Attribute Name

opened this issue · comments

Looking at the keys in redis, it appears that SuperModels that index :id have 2 id keys entered. For instance, a model Test with :id => "12345" will have the following key entries:

  1. "test:12345"
  2. "test:id:12345"

Is there a reason for "test:12345", or is this a bug?

Yes, it's more of a bug. However, everything's changed now, records are serialized into json before being set in Redis - turns out that's much faster. Pull from master.