[Cubicweb] lgc.cache in cubicweb

Aurélien Campéas aurelien.campeas at logilab.fr
Mon Sep 19 14:20:49 CEST 2011


Le 09/09/2011 16:32, Sylvain Thénault a écrit :
> On 09 September 16:23, Aurélien Campéas wrote:
>> Le 09/09/2011 15:52, Sylvain Thénault a écrit :
>>> On 09 September 15:45, Aurélien Campéas wrote:
>>>>>> I'm a bit surprised a lock would be needed
>>>>>> there but not in the surrounding code.
>>>>>
>>>>> I don't get that.
>>>>
>>>> If the objects using these caches (repository, native source) are
>>>> shared amongst threads, we may have bigger probblems. But are they ?
>>>
>>> they are, and are thread safe.
>>
>> If they are thread safe (how is this done ?), why specifically
>> protect this cache subobject ?
>
> this basically is done in session which have local thread storage.
> Other stuff should be either stateless or locked. Put in other words:
> your cache has to be thread-safe by itself.
>

hmm I realize now I'd love to have a note or document that would 
describe the relationship between sessions, threads and transactions ...




More information about the Cubicweb mailing list