[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #8607 [Stem]: Controller's cache isn't thread safe
#8607: Controller's cache isn't thread safe
-----------------------------+----------------------------------------------
Reporter: atagar | Owner: atagar
Type: defect | Status: needs_revision
Priority: normal | Milestone:
Component: Stem | Version:
Keywords: controller easy | Parent:
Points: | Actualpoints:
-----------------------------+----------------------------------------------
Comment(by axitkhurana):
> I'd rather if we didn't move case insensitivity into the cache lookup
helper. It's quite possible that we'll want case sensitive lookups later,
the caveat that I brought up was that GETCONF and GETINFO queries are case
insensitive. This is really the only gotcha I see (ready to push once this
is changed).
>
How about adding an extra parameter for case insensitivity in get and set
cache functions, wouldn't that handle both case sensitive and insensitive
lookups, remove duplicate code?
It would look something like this:
{{{
def _set_cache(self, params, case_insensitive=False, func=None):
....
if case_insensitive:
param = param.lower()
....
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/8607#comment:10>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs