Hello!

I've found out that DM doesn't provide API for setting  
second_level_cache in IdentityMap:

class Repository
   ...
   def identity_map(model)
     @identity_maps[model] ||= IdentityMap.new # <= No 2nd level cache?!
   end
   ...
end

Therefore, I've written a tiny plugin to enable setting this cache  
through model#second_level_cache accessor:

http://pastie.org/306187

Each model defines its own cache, or uses Model.second_level_cache as  
a default.

I have a strong feeling that I'm missing something obvious and there  
should not be need in such silly plugin. How do folks use memcached  
and similar tools with DM?




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to