[Glass] Class var and class inst var caches in libraries

monty via Glass glass at lists.gemtalksystems.com
Tue Oct 4 11:56:38 PDT 2016


Lots of libraries use caches stored in class vars and class isnt vars that are either explicitly or lazily initialized. But with multiple Gems accessing the same repo, this can produce write-write conflicts. In fact, simply sending #initialize to the same class from different Gems can cause them. What are the best ways to implement these caches in GS? Write-locks seem like overkill, so I'm interested in simple ways of making them non-persistent.


More information about the Glass mailing list