Locmem is not multiprocess nor threadsafe
|Reported by:||Tomáš Kopeček||Owned by:||nobody|
|Component:||Core (Cache system)||Version:||master|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Documentation says that this cache backend is safe in multiprocess environment and also threadsafe. This probably not true.
a) multiprocess - it's complete nonsense - every process maintains its own cache object. So key found in c1 is not found in c2, also invalidation is impossible.
b) threads - problem is almost same - there is implementation of threadsafe writing/reading, but objects in threads are different so caches are different.
a) Don't bother with this backend and say in documentation that is good only for development server or one htread/process servers, than it's completely ok to remove locking code.
b) Do it at least thread-safe (make some singleton object?)
Change History (11)
comment:1 Changed 8 years ago by
|Patch needs improvement:||unset|
comment:2 Changed 8 years ago by
|milestone:||→ 1.0 maybe|
|Triage Stage:||Unreviewed → Design decision needed|
comment:5 Changed 5 years ago by
Changed 5 years ago by